Emacs notation:
C-k means while pressing the Control key, hit the k key.M-k means hit the Esc key, and
then hit the k key.k means hit the k key.The last notation is important because there's a huge
difference between C-x C-s and C-x s.
On some keyboards you can use the Alt key instead of Esc, but you have to hold the Alt while you press k.
| Desired Action | Command | Desired Action | Command |
|---|---|---|---|
| invoke emacs | emacs |
quit emacs | C-x C-c |
| suspend emacs | C-z |
resume emacs | fg (at UNIX prompt) |
| quit action | C-g |
undo | C-x u |
| next char (fwd) | C-f |
previous char (back) | C-b |
| next word | M-f |
previous word | M-b |
| beginning of line | C-a |
end of line | C-e |
| next line | C-n |
previous line | C-p |
| next page | C-v |
previous page | M-v |
| first page | M-< |
last page | M-> |
| delete right | C-d |
delete left | DEL |
| kill line right | C-k |
paste (yank) | C-y |
| read file into buffer | C-x C-f |
kill buffer | C-x k |
| save all buffers | C-x s |
save as (write) | C-x C-w |
| split screen horiz. | C-x 2 |
split screen vert. | C-x 3 |
| combine screens | C-x 1 |
redraw screen | C-l |
| move to other frame | C-x o |
move to buffer | C-x b |
| get list of buffers | C-x C-b |
| |
| global replace string | M-x replace-string |
query replace string | M-x % |
| compile | M-x compile |
move to next error | C-x ` |
| invoke debugger | M-x gdb |
quit debugger | q |
| set breakpoint | C-x SPC |
print expression value | p Expression |
| run program | r |
continue program | c |
| next statement | n |
step into function | s |