Motion
|
|
|
|
|
|
|
|
|
|
|
|
Editing
Emacs has waaay too many commands to fit on a cheat sheet. Not only that but I often find that many of the commands I use are from third party add-ons (e.g. Icicles, org-mode). I believe that the key to learning Emacs is effective command discover. Emacs Cheat Sheet Notation C-x Hold down CONTROL and press x M-x Press and release ESC, then press x (On some machines, you can hold down ALT and press x) Starting, Quitting, and Help emacs file From the UNIX command line, open file in emacs. C-x C-c Quit emacs C-g Abort current command C-x u Undo last command C-h t Run tutorial.
|
|
|
|
|
|
|
|
| Exchange the char before cursor with the character at cursor |
| Exchange the word before cursor with the word at cursor |
| Uppercase the current word |
| Lowercase the current word |
| Capitalize the current word |
Killing and Yanking
|
|
|
|
| Kill backward from point to the beginning of the line |
| Kill from point to the end of the current word |
| Kill the word behind point |
| Kill the word behind point, using white space as a word boundary |
| Delete all spaces and tabs around point |
| Yank the top of the kill ring into the buffer at point |
| Rotate the kill ring, and yank the new top |
Emacs Commands Cheat Sheet 2020
Keyboard Macros
| Begin saving the chars typed into the current keyboard macro |
| End saving the chars typed into the current keyboard macro |
| Re-execute the last keyboard macro defined |
Completing
| Attempt to perform completion on the text before point |
| List the possible completions of the text before point |
| Insert all completions of the text before point generated by possible-completions |
Manipulating the History
|
|
|
|
|
|
|
|
|
|
| Search backward starting at the current line (incremental) |
| Search forward starting at the current line (incremental) |
| Search backward using non-incremental search |
| Search forward using non-incremental search |
| Insert the n-th argument to the previous command at point |
| Insert the last argument to the previous command |
Emacs Cheat Sheet Pdf
Rectangles
| Kill the text of the region-rectangle, saving its contents as the 'last killed rectangle' |
| Save the text of the region-rectangle as the 'last killed rectangle' |
| Delete the text of the region-rectangle |
| Yank the last killed rectangle with its upper left corner at point |
| Insert blank space to fill the space of the region-rectangle. This pushes the previous contents of the region-rectangle to the right |
| Insert line numbers along the left edge of the region-rectangle. This pushes the previous contents of the region-rectangle to the right |
| Clear the region-rectangle by replacing all of its contents with spaces |
| Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle |
| Replace rectangle contents with string on each line |
| Insert string on each line of the rectangle |
| Toggle Rectangle Mark mode. When this mode is active, the region-rectangle is highlighted and can be shrunk/grown, and the standard kill and yank commands operate on it |
Miscellaneous
Emacs Cheat Sheet Wallpaper
|
|
| Abort the current editing command and ring the terminals bell |
| If the metafield char x is lowercase run the command that is bound to uppercase char |
| Metafy the next character typed. For example, ESC-p is equivalent to Meta-p |
| Incremental undo, separately remembered for each line |
| Undo all changes made to this line |
| Perform tilde expansion on the current word |
| Set the mark to the point |
| Swap the point with the mark |
| Move to the next occurance of current character under cursor |
| Move to the previous occurrence of current character under cursor |
| Without argument line is commented, with argument uncommented (if it was commented) |
| When in vi mode, switch to emacs mode |
| When in emacs mode, switch to vi mode |
| Specify the digit to the argument |
Notes
- Based on the cheat sheet from cheat-sheets.org.
- Converted by @erggo.