<< XTerm Options | Journals | Random Notes >>
XEmacs Summary
Special Keys
Emacs commands are accompanied either by simultaneously holding down the
Control key (indicated by C-) or the Alt key (indicated by M-).
Essential Commands
| C-h a | help by keyword (apropos) |
| C-h k | help on key |
| C-x u | undo |
| C-x C-g | get out of current operation or command |
| C-x C-s | save the file |
| C-x C-c | close Emacs |
Moving Around
| C-f | forward one character |
| C-b | back one character |
| C-p | previous line |
| C-n | next line |
| C-a | beginning of line |
| C-e | end of line |
| C-l | center current line on screen |
| C-v | scroll forward |
| M-v | scroll backward |
| M-f | forward one word |
| M-b | back one word |
| M-a | beginning of sentence |
| M-e | end of sentence |
| M-[ | beginning of paragraph |
| M-] | end of paragraph |
| C-HOME | begining of buffer |
| M-< | beginning of buffer |
| C-END | end of buffer |
| M-> | end of buffer |
| M-g | goto line |
Cutting and Pasting
| DEL | delete the character before the cursor |
| C-d | delete the character following the cursor |
| M-d | delete the word following the cursor |
| C-k | kill line |
| M-k | kill sentence |
| C-@ | begin selection (use the mouse instead!) |
| C-w | cut (wipe) the selected region |
| M-w | copy the selected region |
| C-y | paste (yank back) deleted text |
Searching and Relacing
| C-s | search forward |
| C-r | search in reverse |
| C-M-s | search forward (regular expression) |
| C-M-r | search in reverse (regular expression) |
| M-% | query replace |
| M-x | query-replace-regexp query replace regular expression |
| RETURN | escape from incremental search |
Miscellaneous Operations on Text
| M-c | capitalize word |
| M-u | uppercase word |
| M-l | lowercase word |
| C-t | transpose characters |
| M-t | transpose words |
| M-q | reformat paragraph |
| M-g | reformat each paragraph in region |
| M-x | auto-fill-mode turn on word wrap |
| M-x | set-variable <return> set length of lines to 45 characters |
| | fill-column <return> 45 |
Other Important Functions
| C-q | treat the next character literally (quote) |
| C-u | enter argument for (next) command |
| M-(n) | repeat the next command (n) times |
Windows
| C-x 0 | delete this window, keep others |
| C-x 1 | delete other windows |
| C-x 2 | split window with horizontal divider |
| C-x 3 | split window with vertical divider |
| C-x o | switch to other window |
File Commands
| C-x C-f | find file and read it |
| C-x C-v | find and read alternate file |
| C-x i | insert file at cursor position |
| C-x C-s | save file |
| C-x C-w | write buffer to a different file |
| C-x C-c | exit emacs, and be prompted to save |
Amusements
| M-x | hanoi towers of hanoi |
| M-x | doctor non-directive psychotherapy |