DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Define Key Shortcuts in Emacs


  • Set a keybind: (global-set-key <key> <command>) (global-set-key <key> <command>) and (define-key global-map <key> <command>) are basically the same thing in most cases;

  • Switch to another buffer: C-x b

  • Open file: C-x C-f

  • Cancel a command: C-g

  • Quit Emacs: C-x C-c

  • Find out the current keybinding of a key, for example, C-x C-e: press C-h k, then press C-x C-e;

  • List all current key bindings:

  • Get last executed command, for example: use "C-x b" to switch to another window: Press C-x b, select "Messages", Press C-x , then you can see the last executed command "(switch-to-buffer "Message")";

Ref:

  • http://ergoemacs.org/emacs/keyboard_shortcuts.html

  • http://docs.huihoo.com/homepage/shredderyin/wiki/KeyBinding.html



Published

Sep 26, 2013

Last Updated

Sep 26, 2013

Category

Tech

Tags

  • emacs 22
  • shortcut 5

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor