(Updated 2001 Jan 25)
Emacs
a text editor
The basics:
Syntax conventions here:
Navigation:
| Keystroke | Function | Comments |
| C-f | Forward 1 character | The arrows work, generally |
| C-b | Backward 1 character | ditto |
| C-p | Up 1 line | ditto |
| C-n | Down 1 line | ditto |
| M-f | Forward 1 word | |
| M-b | Backward 1 word | |
| C-a | Beginning of line | |
| C-e | End of line | |
| M-a | Beginning of sentence | |
| M-e | End of sentence | |
| M-{ | Previous paragraph | |
| M-} | Next paragraph | |
| C-v | Page down | |
| M-v | Page up | |
| M-< | Beginning of file | |
| M-> | End of file | |
| C-x r Spc r | Mark register | This is an imaginary landmark |
| C-x r j r | Jump to register | |
| C-x < | Scroll left | For when a line is wider than the screen |
| C-x > | Scroll right | ditto |
| C-l | Refresh screen, centering around cursor | That's a lowercase 'L' |
Editing:
| Keystroke | Function | Comments |
| Del | delete character backward | |
| C-d | delete character forward | |
| M-Del | delete word backward | |
| M-d | delete word forward | |
| C-_ or C-x u | undo | |
| C-w | cut | |
| M-w | copy | |
| C-y | paste | |
| C-@ or C-Spc | Set mark for deletion | |
| C-w | Kill marked text | |
| C-u <num> <cmd> | Repeat <cmd> <num> times | |
| C-g | Break | For aborting a multi-step command |
| C-y | Bring back most recently killed text ("yank") | |
| M-y | Yanks not most recently deleted text |
File management:
| Keystroke | Function | Comments |
| C-x C-f | find file | |
| C-x C-s | save file | |
| C-x C-w | save as | |
| C-x d | open directory | files can be managed here |
| C-x i | insert file | |
| C-x C-c | exit | will ask whether to save open files |
| C-x C-b | list open buffers | |
| C-x k | kill buffer | |
| M-x kill-some-buffers | kills interactively | |
| C-x 0 | delete current window | window can be broken down |
| C-x 1 | keep only current window | |
| C-x 2 | split window horizontally | |
| C-x 3 | split window vertically | |
| C-x o | move cursor to other window |
Miscellaneous:
| Keystroke | Function | Comments |
| M-x replace-string | replace string | replaces instances after cursor |
| M-x auto-fill-mode | toggle word wrap | applies only to future text |
| M-q | word wrap | for existing text |
| C-s | forward search | |
| C-s C-s | repeat search | |
| C-r | reverse search | |
| C-M-s | search regular expression |
Help:
| Keystroke | Function | Comments |
| C-h t | tutorial | |
| C-h b | show key-bindings | |
| C-h <cmd> | gives a brief description of <cmd> |