Plug Emacs Cheat Sheet

Basic keystrokes

The way we refer to key sequences in Emacs is probably a little different than what you're used to. Here's what they look like in the Emacs world.

Familiar notation Emacs notation
Alt+x global-font-lock-mode, ENTER M-x global-font-lock-mode RET
Control+h, T C-h T
Control+h, f, what-page, ENTER C-h f what-page RET
Control+h, i C-h i

As you can see, the Emacs notation is more concise than what you might be used to.

Now we will cover some of the basic keystrokes that are needed in order to use Emacs.

Keystroke Purpose
C-x C-c Exit Emacs
C-x C-f Find and open a file
C-x C-w Save the contents to a different file ("Save As")
C-x C-s Save the current file
C-h or F1 Trigger the interactive help feature
C-h k Find out what the next keypress does
<arrow keys> Move around in the file
Page Up / Page Down Move up and down by a pageful
Home / End Move to the beginning and end of a line
C-a / C-e The same as the above
C-< / C-> Move to the beginning and end of a file

Copying and pasting uses a slightly different method than what you're used to. To select a region of text, move to the beginning of the area you want to select and hit C-SPC (Control + the Space key). Release the keys. Then move to the end of the region that you would like to select. Hit M-w (Alt + w) to copy the region to the Emacs clipboard. Using C-w instead would remove ("wipe") the region and put it in the Emacs clipboard. Then move to where you want to insert the text and hit C-y to insert ("yank") the text into place.

Delete and backspace should do what you expect. If they both delete backwards, then to fix it you will need to add the following snippet to your Emacs configuration file, which is located in ~/.emacs by default.

(normal-erase-is-backspace-mode 1)