Emacs Keyboard Shortcuts

Editing, file, window, buffer and help keys for GNU Emacs. Every item below is clearly marked as a shortcut, command, or syntax reference.

Most Useful Emacs Keyboard Shortcuts

EmacsShortcut

Run a command by name

Windows
Alt+X

Type M-x, then the command name, then Enter. Emacs runs any command by name.

Learn More
EmacsShortcut

Cancel the current command

Windows
Ctrl+G

Stop a command that is running, or abandon a command you have started typing.

Learn More
EmacsShortcut

Open a file

Windows
Ctrl+X, Ctrl+F

Read a file into a buffer and start editing it (find-file).

Learn More
EmacsShortcut

Save the current file

Windows
Ctrl+X, Ctrl+S

Write the buffer's text back to the file it came from (save-buffer).

Learn More
EmacsShortcut

Go to the start of the line

Windows
Ctrl+A

Move to the beginning of the current line (move-beginning-of-line).

Learn More
EmacsShortcut

Go to the end of the line

Windows
Ctrl+E

Move to the end of the current line (move-end-of-line).

Learn More
EmacsShortcut

Kill the rest of the line

Windows
Ctrl+K

Cut from the cursor to the end of the line, or whole lines when the cursor is already at the line's end (kill-line).

Learn More
EmacsShortcut

Kill the word before point

Windows
Alt+Backspace

Cut backwards to the start of the word (backward-kill-word).

Learn More

More Emacs Keyboard Shortcuts

Emacs Shortcuts for Mac

Entries with recorded Mac keys are listed below. Official source links are on each reference page.

TaskTypeShortcut
Run a command by nameShortcutAlt+X
Cancel the current commandShortcutCtrl+G
Open a fileShortcutCtrl+X, Ctrl+F
Save the current fileShortcutCtrl+X, Ctrl+S
Go to the start of the lineShortcutCtrl+A
Go to the end of the lineShortcutCtrl+E
Kill the rest of the lineShortcutCtrl+K
Kill the word before pointShortcutAlt+Backspace
Paste the last killShortcutCtrl+Y
Undo the last changeShortcutCtrl+/
Search forward as you typeShortcutCtrl+S
Switch to another bufferShortcutCtrl+X, B
Quit EmacsShortcutCtrl+X, Ctrl+C
Suspend EmacsShortcutCtrl+Z
Save to a different file nameShortcutCtrl+X, Ctrl+W
Save some or all buffersShortcutCtrl+X, S
Move forward one characterShortcutCtrl+F
Move backward one characterShortcutCtrl+B
Move down one lineShortcutCtrl+N
Move up one lineShortcutCtrl+P
Move forward one wordShortcutAlt+F
Move backward one wordShortcutAlt+B
Go to the top of the bufferShortcutAlt+<
Go to the end of the bufferShortcutAlt+>
Delete the next characterShortcutCtrl+D
Kill the whole lineShortcutCtrl+Shift+Backspace
Kill the word after pointShortcutAlt+D
Kill the selected regionShortcutCtrl+W
Copy the selected regionShortcutAlt+W
Cycle through pasted killsShortcutAlt+Y
Transpose two wordsShortcutAlt+T
Delete whitespace around pointShortcutAlt+\
Delete blank lines around pointShortcutCtrl+X, Ctrl+O
Join two linesShortcutAlt+^
Set the markShortcutCtrl+Space
Jump to the markShortcutCtrl+X, Ctrl+X
Mark the whole bufferShortcutCtrl+X, H
Mark the current paragraphShortcutAlt+H
Search backward as you typeShortcutCtrl+R
Split the window verticallyShortcutCtrl+X, 2
Split the window side by sideShortcutCtrl+X, 3
Switch to another windowShortcutCtrl+X, O
Close the other windowsShortcutCtrl+X, 1
Scroll the other windowShortcutCtrl+Alt+V
Scroll to the next pageShortcutCtrl+V
Scroll to the previous pageShortcutAlt+V
Center the current lineShortcutCtrl+L
List all buffersShortcutCtrl+X, Ctrl+B
Close a bufferShortcutCtrl+X, K
Find out what a key doesShortcutCtrl+H, K
Find a command's documentationShortcutCtrl+H, F
Find a variable's documentationShortcutCtrl+H, V
List all key bindingsShortcutCtrl+H, B
Show cursor position infoShortcutCtrl+X, =

Frequently Asked Questions

Which Emacs keyboard shortcuts are included?

Examples in this reference include Run a command by name (Alt + X), Cancel the current command (Ctrl + G), Open a file (Ctrl + X, Ctrl + F), Save the current file (Ctrl + X, Ctrl + S), Go to the start of the line (Ctrl + A).

Do Emacs shortcuts work on a Mac?

Mac key values are listed for 54 of the 54 entries. Use the value shown for the specific action; do not assume Ctrl can be replaced with Cmd. Each reference page links its official source.

What if a Emacs task has no keyboard shortcut?

Some reference pages include a menu alternative. When no equivalent is documented here, consult the linked official help rather than assuming a key combination.