| "C-" (control) means "hold down Ctrl key" |
| "M-" (meta) means "hold down Alt key", or "press and release Esc key" |
| Category | Command | Keystrokes | Mnemonic |
| Start/Stop | start emacs from DOS | emacs | |
| exit emacs | C-x C-c | ||
| Files | read a file into Emacs | C-x C-f | find |
| create a new file (name it as if it exists) | C-x C-f | find | |
| save | C-x C-s | save | |
| save as ... | C-x C-w | write | |
| Cursor Motion | forward (right arrow) | C-f | forward |
| backward (left arrow) | C-b | backward | |
| up (up arrow) | C-p | previous | |
| down (down arrow) | C-n | next | |
| jump to start of line | C-a | a = start alphabet | |
| jump to end of line | C-e | end | |
| jump to start of buffer | M-< | < = left | |
| jump to end of buffer | M-> | > = right | |
| Cut, Copy, Paste
"kill" = "cut", |
delete current character | C-d | delete |
| delete previous character | Delete or Backspace |
||
| kill to end of line | C-k | kill | |
| kill region | C-w | wipe | |
| copy region | M-w | ||
| yank back last thing killed | C-y | yank | |
| replace last yank with previous kill | M-y | ||
| Marking Regions "region" = text between "point" (cursor) and invisible "mark" |
set mark here | C-SPACE | |
| mark entire buffer | C-x h | ||
| Formatting | indent current line | TAB | |
| indent entire buffer | M-p | "pretty-print" (non-standard) | |
| fill paragraph | M-q | ||
| Buffers | cycle through buffers | C-j | jump (non-standard) |
| shell (command) buffer | C-z | (non-standard) | |
| list all buffers | C-x C-b | buffer | |
| close a buffer | C-x k | kill | |
| Error Recovery | abort partially typed or executing command | C-g | |
| undo an unwanted change | C-_ | undo | |
| restore a buffer to its original contents | M-x revert-buffer | ||
| The Minibuffer | complete as much as possible | TAB | |
| complete up to one word | SPACE | ||
| Type C-x ESC ESC to repeat the last command that used the minibuffer. Then the following keys are defined. | previous minibuffer command | M-p | previous |
| next minibuffer command | M-n | next | |
| Multiple Windows | make one window | C-x 1 | one |
| delete this window | C-x 0 | zero | |
| split window vertically | C-x 2 | two | |
| split window horizontally | C-x 3 | ||
| switch to another window | C-x o | other | |
| Incremental Search Then type a word to search for. Use C-s or C-r again to repeat the search in either direction |
search forward | C-s | search |
| search backward | C-r | reverse | |
| exit search | Enter | ||
| Query Replace yes = "y" or SPACE, no = "n" |
interactively replace text | M-% | |
| Directory Editor find directory (C-x C-f . ), then "?" for help |
list and manage files | ||
| Help | help | C-h | help |
| show function a key runs | C-h k | key | |
| describe a function | C-h f | function | |
| tutorial | C-h t | tutorial |