Complete Emacs keyboard shortcuts and commands reference — 195 shortcuts across 27 categories. Quick reference cheat sheet for Windows & Mac.
Emacs writes its shortcuts in its own notation — C- is Ctrl and M- is Meta, which is Alt on most keyboards — and the ten in this table are the ones that let a newcomer open, edit, save and quit. The notes explain the notation, the two-key chords that start with C-x, and the one key that gets you out of anything.
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + z | iconify Emacs (or suspend it in terminal) | Iconify Emacs (or suspend it in terminal). |
| Ctrl + x or Ctrl + c | exit Emacs permanently | Exit Emacs permanently. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x or Ctrl + f | read a file into Emacs | Read a file into Emacs. |
| Ctrl + x or Ctrl + s | save a file back to disk | Save a file back to disk. |
| Ctrl + x, s | save all files | Save all files. |
| Ctrl + x, i | insert contents of another file into this buffer | Insert contents of another file into this buffer. |
| Ctrl + x or Ctrl + v | replace this file with the file you really want | Replace this file with the file you really want. |
| Ctrl + x or Ctrl + w | write buffer to a specified file | Write buffer to a specified file. |
| Ctrl + x or Ctrl + q | toggle read-only status of buffer | Toggle read-only status of buffer. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, 1 | remove help window | Remove help window. |
| Ctrl + Alt + v | scroll help window | Scroll help window. |
| Ctrl + h, a | apropos: show commands matching a string | Apropos: show commands matching a string. |
| Ctrl + h, k | describe the function a key runs | Describe the function a key runs. |
| Ctrl + h, f | describe a function | Describe a function. |
| Ctrl + h, m | get mode-specific information | Get mode-specific information. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + x, recover-session | recover files lost by a system crash | Recover files lost by a system crash. |
| Ctrl + x, u or Ctrl + _ | undo an unwanted change | Undo an unwanted change. |
| Alt + x, revert-buffer | restore a buffer to its original contents | Restore a buffer to its original contents. |
| Ctrl + l | redraw garbaged screen | Redraw garbaged screen. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + s | search forward | Search forward. |
| Ctrl + r | search backward | Search backward. |
| Ctrl + Alt + s | regular expression search | Regular expression search. |
| Ctrl + Alt + r | reverse regular expression search | Reverse regular expression search. |
| Alt + p | select previous search string | Select previous search string. |
| Alt + n | select next search string | Select next search string. |
| Enter | exit incremental search | Exit incremental search. |
| Backspace | undo effect of last character | Undo effect of last character. |
| Ctrl + g | abort current search | Abort current search. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + b | character (backward) | Character (backward). |
| Ctrl + f | character (forward) | Character (forward). |
| Alt + b | word (backward) | Word (backward). |
| Alt + f | word (forward) | Word (forward). |
| Ctrl + p | line (backward) | Line (backward). |
| Ctrl + n | line (forward) | Line (forward). |
| Ctrl + a | go to line beginning (or end) (backward) | Go to line beginning (or end) (backward). |
| Ctrl + e | go to line beginning (or end) (forward) | Go to line beginning (or end) (forward). |
| Alt + a | sentence (backward) | Sentence (backward). |
| Alt + e | sentence (forward) | Sentence (forward). |
| Alt + { | paragraph (backward) | Paragraph (backward). |
| Alt + } | paragraph (forward) | Paragraph (forward). |
| Ctrl + x, [ | page (backward) | Page (backward). |
| Ctrl + x, ] | page (forward) | Page (forward). |
| Ctrl + Alt + b | sexp (backward) | Sexp (backward). |
| Ctrl + Alt + f | sexp (forward) | Sexp (forward). |
| Ctrl + Alt + a | function (backward) | Function (backward). |
| Ctrl + Alt + e | function (forward) | Function (forward). |
| Alt + < | go to buffer beginning (or end) (backward) | Go to buffer beginning (or end) (backward). |
| Alt + > | go to buffer beginning (or end) (forward) | Go to buffer beginning (or end) (forward). |
| Ctrl + v | scroll to next screen | Scroll to next screen. |
| Alt + v | scroll to previous screen | Scroll to previous screen. |
| Ctrl + x, < | scroll left | Scroll left. |
| Ctrl + x, > | scroll right | Scroll right. |
| Ctrl + l | scroll current line to center, top, bottom | Scroll current line to center, top, bottom. |
| Alt + g, g | goto line | Goto line. |
| Alt + g, c | goto char | Goto char. |
| Alt + m | back to indentation | Back to indentation. |
| Shortcut | Action | What it does |
|---|---|---|
| Backspace | character (delete, not kill) (backward) | Character (delete, not kill) (backward). |
| Ctrl + d | character (delete, not kill) (forward) | Character (delete, not kill) (forward). |
| Alt + Backspace | word (backward) | Word (backward). |
| Alt + d | word (forward) | Word (forward). |
| Alt + 0 or Ctrl + k | line (to end of) (backward) | Line (to end of) (backward). |
| Ctrl + k | line (to end of) (forward) | Line (to end of) (forward). |
| Ctrl + x, Backspace | sentence (backward) | Sentence (backward). |
| Alt + k | sentence (forward) | Sentence (forward). |
| Alt + - or Ctrl + Alt + k | sexp (backward) | Sexp (backward). |
| Ctrl + Alt + k | sexp (forward) | Sexp (forward). |
| Ctrl + w | kill region | Kill region. |
| Alt + w | copy region to kill ring | Copy region to kill ring. |
| Alt + z, char | kill through next occurrence of char | Kill through next occurrence of char. |
| Ctrl + y | yank back last thing killed | Yank back last thing killed. |
| Alt + y | replace last yank with previous kill | Replace last yank with previous kill. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + @ or Ctrl + Space | set mark here | Set mark here. |
| Ctrl + x or Ctrl + x | exchange point and mark | Exchange point and mark. |
| Alt + @ | set mark arg words away | Set mark arg words away. |
| Alt + h | mark paragraph | Mark paragraph. |
| Ctrl + x or Ctrl + p | mark page | Mark page. |
| Ctrl + Alt + @ | mark sexp | Mark sexp. |
| Ctrl + Alt + h | mark function | Mark function. |
| Ctrl + x, h | mark entire buffer | Mark entire buffer. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + % | interactively replace a text string | Interactively replace a text string. |
| Alt + x, query-replace-regexp | using regular expressions | Using regular expressions. |
| Shortcut | Action | What it does |
|---|---|---|
| Space or y | replace this one, go on to next | Replace this one, go on to next. |
| Backspace or n | skip to next without replacing | Skip to next without replacing. |
| Enter | exit query-replace | Exit query-replace. |
| Ctrl + r | enter recursive edit (C-M-c to exit) | Enter recursive edit (C-M-c to exit). |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, 1 | delete all other windows | Delete all other windows. |
| Ctrl + x, 5, 1 | delete all other windows (frame) | Delete all other windows (frame). |
| Ctrl + x, 2 | split window, above and below | Split window, above and below. |
| Ctrl + x, 5, 2 | split window, above and below (frame) | Split window, above and below (frame). |
| Ctrl + x, 0 | delete this window | Delete this window. |
| Ctrl + x, 5, 0 | delete this window (frame) | Delete this window (frame). |
| Ctrl + x, 3 | split window, side by side | Split window, side by side. |
| Ctrl + Alt + v | scroll other window | Scroll other window. |
| Ctrl + x, o | switch cursor to another window | Switch cursor to another window. |
| Ctrl + x, 5, o | switch cursor to another window (frame) | Switch cursor to another window (frame). |
| Ctrl + x, 4, b | select buffer in other window | Select buffer in other window. |
| Ctrl + x, 5, b | select buffer in other window (frame) | Select buffer in other window (frame). |
| Ctrl + x, 4, f | find file in other window | Find file in other window. |
| Ctrl + x, 5, f | find file in other window (frame) | Find file in other window (frame). |
| Ctrl + x, 4, r | find file read-only in other window | Find file read-only in other window. |
| Ctrl + x, 5, r | find file read-only in other window (frame) | Find file read-only in other window (frame). |
| Ctrl + x, 4, d | run Dired in other window | Run Dired in other window. |
| Ctrl + x, 5, d | run Dired in other window (frame) | Run Dired in other window (frame). |
| Ctrl + x, 4, . | find tag in other window | Find tag in other window. |
| Ctrl + x, 5, . | find tag in other window (frame) | Find tag in other window (frame). |
| Ctrl + x, ^ | grow window taller | Grow window taller. |
| Ctrl + x, { | shrink window narrower | Shrink window narrower. |
| Ctrl + x, } | grow window wider | Grow window wider. |
| Shortcut | Action | What it does |
|---|---|---|
| Tab | indent current line (mode-dependent) | Indent current line (mode-dependent). |
| Ctrl + Alt + \ | indent region (mode-dependent) | Indent region (mode-dependent). |
| Ctrl + Alt + q | indent sexp (mode-dependent) | Indent sexp (mode-dependent). |
| Ctrl + x, Tab | indent region rigidly arg columns | Indent region rigidly arg columns. |
| Alt + ; | indent for comment | Indent for comment. |
| Ctrl + o | insert newline after point | Insert newline after point. |
| Ctrl + Alt + o | move rest of line vertically down | Move rest of line vertically down. |
| Ctrl + x or Ctrl + o | delete blank lines around point | Delete blank lines around point. |
| Alt + ^ | join line with previous (with arg, next) | Join line with previous (with arg, next). |
| Alt + \ | delete all white space around point | Delete all white space around point. |
| Alt + Space | put exactly one space at point | Put exactly one space at point. |
| Alt + q | fill paragraph | Fill paragraph. |
| Ctrl + x, f | set fill column to arg | Set fill column to arg. |
| Ctrl + x, . | set prefix each line starts with | Set prefix each line starts with. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + u | uppercase word | Uppercase word. |
| Alt + l | lowercase word | Lowercase word. |
| Alt + c | capitalize word | Capitalize word. |
| Ctrl + x or Ctrl + u | uppercase region | Uppercase region. |
| Ctrl + x or Ctrl + l | lowercase region | Lowercase region. |
| Shortcut | Action | What it does |
|---|---|---|
| Tab | complete as much as possible | Complete as much as possible. |
| Space | complete up to one word | Complete up to one word. |
| Enter | complete and execute | Complete and execute. |
| Alt + p | fetch previous minibuffer input | Fetch previous minibuffer input. |
| Alt + n | fetch later minibuffer input or default | Fetch later minibuffer input or default. |
| Alt + r | regexp search backward through history | Regexp search backward through history. |
| Alt + s | regexp search forward through history | Regexp search forward through history. |
| Ctrl + g | abort command | Abort command. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, b | select another buffer | Select another buffer. |
| Ctrl + x or Ctrl + b | list all buffers | List all buffers. |
| Ctrl + x, k | kill a buffer | Kill a buffer. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + t | transpose characters | Transpose characters. |
| Alt + t | transpose words | Transpose words. |
| Ctrl + x or Ctrl + t | transpose lines | Transpose lines. |
| Ctrl + Alt + t | transpose sexps | Transpose sexps. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + $ | check spelling of current word | Check spelling of current word. |
| Alt + x, ispell-region | check spelling of all words in region | Check spelling of all words in region. |
| Alt + x, ispell-buffer | check spelling of entire buffer | Check spelling of entire buffer. |
| Alt + x, flyspell-mode | toggle on-the-fly spell checking | Toggle on-the-fly spell checking. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + . | find a tag (a definition) | Find a tag (a definition). |
| Alt + x, visit-tags-table | specify a new tags file | Specify a new tags file. |
| Alt + x, tags-search | regexp search on all files in tags table | Regexp search on all files in tags table. |
| Alt + x, tags-query-replace | run query-replace on all the files | Run query-replace on all the files. |
| Shortcut | Action | What it does |
|---|---|---|
| Alt + ! | execute a shell command | Execute a shell command. |
| Alt + & | execute a shell command asynchronously | Execute a shell command asynchronously. |
| Alt + | | run a shell command on the region | Run a shell command on the region. |
| Ctrl + u or Alt + | | filter region through a shell command | Filter region through a shell command. |
| Alt + x, shell | start a shell in window *shell* | Start a shell in window *shell*. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, r, r | copy rectangle to register | Copy rectangle to register. |
| Ctrl + x, r, k | kill rectangle | Kill rectangle. |
| Ctrl + x, r, y | yank rectangle | Yank rectangle. |
| Ctrl + x, r, o | open rectangle, shifting text right | Open rectangle, shifting text right. |
| Ctrl + x, r, c | blank out rectangle | Blank out rectangle. |
| Ctrl + x, r, t | prefix each line with a string | Prefix each line with a string. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, a, g | add global abbrev | Add global abbrev. |
| Ctrl + x, a, l | add mode-local abbrev | Add mode-local abbrev. |
| Ctrl + x, a, i, g | add global expansion for this abbrev | Add global expansion for this abbrev. |
| Ctrl + x, a, i, l | add mode-local expansion for this abbrev | Add mode-local expansion for this abbrev. |
| Ctrl + x, a, e | explicitly expand abbrev | Explicitly expand abbrev. |
| Alt + / | expand previous word dynamically | Expand previous word dynamically. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + u, num | numeric argument | Numeric argument. |
| Alt + - | negative argument | Negative argument. |
| Ctrl + q, char | quoted insert | Quoted insert. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, Enter, l | specify principal language | Specify principal language. |
| Alt + x, list-input-methods | show all input methods | Show all input methods. |
| Ctrl + \ | enable or disable input method | Enable or disable input method. |
| Ctrl + x, Enter, c | set coding system for next command | Set coding system for next command. |
| Alt + x, list-coding-systems | show all coding systems | Show all coding systems. |
| Alt + x, prefer-coding-system | choose preferred coding system | Choose preferred coding system. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + h, i | enter the Info documentation reader | Enter the Info documentation reader. |
| Ctrl + h, S | find specified function or variable in Info | Find specified function or variable in Info. |
| Space | scroll forward | Scroll forward. |
| Backspace | scroll reverse | Scroll reverse. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, r, s | save region in register | Save region in register. |
| Ctrl + x, r, i | insert register contents into buffer | Insert register contents into buffer. |
| Ctrl + x, r, Space | save value of point in register | Save value of point in register. |
| Ctrl + x, r, j | jump to point saved in register | Jump to point saved in register. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x, ( | start defining a keyboard macro | Start defining a keyboard macro. |
| Ctrl + x, ) | end keyboard macro definition | End keyboard macro definition. |
| Ctrl + x, e | execute last-defined keyboard macro | Execute last-defined keyboard macro. |
| Ctrl + u or Ctrl + x, ( | append to last keyboard macro | Append to last keyboard macro. |
| Alt + x, name-last-kbd-macro | name last keyboard macro | Name last keyboard macro. |
| Alt + x, insert-kbd-macro | insert Lisp definition in buffer | Insert Lisp definition in buffer. |
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + x or Ctrl + e | eval sexp before point | Eval sexp before point. |
| Ctrl + Alt + x | eval current defun | Eval current defun. |
| Alt + x, eval-region | eval region | Eval region. |
| Alt + : | read and eval minibuffer | Read and eval minibuffer. |
| Alt + x, load-library | load a Lisp library from load-path | Load a Lisp library from load-path. |
The most essential Emacs shortcuts are: C-x C-s (Save), C-x C-f (Open file), C-x C-c (Quit).
The Emacs shortcut for save is C-x C-s.
Print the Emacs cheat sheet and keep it next to your keyboard for the first week, then switch to active recall: open Shortcut Speedrun and practice Emacs shortcuts against the clock until they're automatic.
Yes — use My Stack to combine Emacs shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
Most do not — the underlying key is the same, but Emacs (like most software) maps Ctrl on Windows/Linux to Cmd on Mac for standard operations. Where a shortcut is platform-specific, this page notes the Mac variant next to the Windows one.
C-x C-s means hold Ctrl and press x, then hold Ctrl and press s: a chord of two keys, each with its modifier. M-x is Alt + x (or Esc then x on keyboards where Alt is taken). C-x is the prefix for file and buffer commands and C-c for mode-specific ones, which is why so many bindings begin with them. C-g cancels whatever is in progress — a half-typed chord, a prompt in the minibuffer, a running command — and is the key to press whenever Emacs seems stuck.
C-x C-f opens a file (creating it if new) with completion in the minibuffer, C-x C-s saves the current buffer and C-x C-c quits, asking about unsaved buffers. Buffers, not files, are what you edit; C-x b switches between them and C-x C-b lists them.
C-w cuts (kills) the region between mark and point, M-w copies it and C-y pastes (yanks); the kill ring holds many entries and M-y after C-y cycles through them. C-/ undoes — Emacs undo is a single command that walks back through history, including undos. C-s starts incremental search, which moves as you type and where C-s again finds the next match. M-x runs any command by name with completion, so M-x followed by describe-key tells you what any key does.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"