Emacs Keyboard Shortcuts

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.

Leaving Emacs (2)

ShortcutActionWhat it does
Ctrl + ziconify Emacs (or suspend it in terminal)Iconify Emacs (or suspend it in terminal).
Ctrl + x or Ctrl + cexit Emacs permanentlyExit Emacs permanently.

Files (7)

ShortcutActionWhat it does
Ctrl + x or Ctrl + fread a file into EmacsRead a file into Emacs.
Ctrl + x or Ctrl + ssave a file back to diskSave a file back to disk.
Ctrl + x, ssave all filesSave all files.
Ctrl + x, iinsert contents of another file into this bufferInsert contents of another file into this buffer.
Ctrl + x or Ctrl + vreplace this file with the file you really wantReplace this file with the file you really want.
Ctrl + x or Ctrl + wwrite buffer to a specified fileWrite buffer to a specified file.
Ctrl + x or Ctrl + qtoggle read-only status of bufferToggle read-only status of buffer.

Getting Help (6)

ShortcutActionWhat it does
Ctrl + x, 1remove help windowRemove help window.
Ctrl + Alt + vscroll help windowScroll help window.
Ctrl + h, aapropos: show commands matching a stringApropos: show commands matching a string.
Ctrl + h, kdescribe the function a key runsDescribe the function a key runs.
Ctrl + h, fdescribe a functionDescribe a function.
Ctrl + h, mget mode-specific informationGet mode-specific information.

Error Recovery (4)

ShortcutActionWhat it does
Alt + x, recover-sessionrecover files lost by a system crashRecover files lost by a system crash.
Ctrl + x, u or Ctrl + _undo an unwanted changeUndo an unwanted change.
Alt + x, revert-bufferrestore a buffer to its original contentsRestore a buffer to its original contents.
Ctrl + lredraw garbaged screenRedraw garbaged screen.

Incremental Search (9)

ShortcutActionWhat it does
Ctrl + ssearch forwardSearch forward.
Ctrl + rsearch backwardSearch backward.
Ctrl + Alt + sregular expression searchRegular expression search.
Ctrl + Alt + rreverse regular expression searchReverse regular expression search.
Alt + pselect previous search stringSelect previous search string.
Alt + nselect next search stringSelect next search string.
Enterexit incremental searchExit incremental search.
Backspaceundo effect of last characterUndo effect of last character.
Ctrl + gabort current searchAbort current search.

Motion (28)

ShortcutActionWhat it does
Ctrl + bcharacter (backward)Character (backward).
Ctrl + fcharacter (forward)Character (forward).
Alt + bword (backward)Word (backward).
Alt + fword (forward)Word (forward).
Ctrl + pline (backward)Line (backward).
Ctrl + nline (forward)Line (forward).
Ctrl + ago to line beginning (or end) (backward)Go to line beginning (or end) (backward).
Ctrl + ego to line beginning (or end) (forward)Go to line beginning (or end) (forward).
Alt + asentence (backward)Sentence (backward).
Alt + esentence (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 + bsexp (backward)Sexp (backward).
Ctrl + Alt + fsexp (forward)Sexp (forward).
Ctrl + Alt + afunction (backward)Function (backward).
Ctrl + Alt + efunction (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 + vscroll to next screenScroll to next screen.
Alt + vscroll to previous screenScroll to previous screen.
Ctrl + x, <scroll leftScroll left.
Ctrl + x, >scroll rightScroll right.
Ctrl + lscroll current line to center, top, bottomScroll current line to center, top, bottom.
Alt + g, ggoto lineGoto line.
Alt + g, cgoto charGoto char.
Alt + mback to indentationBack to indentation.

Killing and Deleting (15)

ShortcutActionWhat it does
Backspacecharacter (delete, not kill) (backward)Character (delete, not kill) (backward).
Ctrl + dcharacter (delete, not kill) (forward)Character (delete, not kill) (forward).
Alt + Backspaceword (backward)Word (backward).
Alt + dword (forward)Word (forward).
Alt + 0 or Ctrl + kline (to end of) (backward)Line (to end of) (backward).
Ctrl + kline (to end of) (forward)Line (to end of) (forward).
Ctrl + x, Backspacesentence (backward)Sentence (backward).
Alt + ksentence (forward)Sentence (forward).
Alt + - or Ctrl + Alt + ksexp (backward)Sexp (backward).
Ctrl + Alt + ksexp (forward)Sexp (forward).
Ctrl + wkill regionKill region.
Alt + wcopy region to kill ringCopy region to kill ring.
Alt + z, charkill through next occurrence of charKill through next occurrence of char.
Ctrl + yyank back last thing killedYank back last thing killed.
Alt + yreplace last yank with previous killReplace last yank with previous kill.

Marking (8)

ShortcutActionWhat it does
Ctrl + @ or Ctrl + Spaceset mark hereSet mark here.
Ctrl + x or Ctrl + xexchange point and markExchange point and mark.
Alt + @set mark arg words awaySet mark arg words away.
Alt + hmark paragraphMark paragraph.
Ctrl + x or Ctrl + pmark pageMark page.
Ctrl + Alt + @mark sexpMark sexp.
Ctrl + Alt + hmark functionMark function.
Ctrl + x, hmark entire bufferMark entire buffer.

Query Replace (2)

ShortcutActionWhat it does
Alt + %interactively replace a text stringInteractively replace a text string.
Alt + x, query-replace-regexpusing regular expressionsUsing regular expressions.

Query Replace responses (4)

ShortcutActionWhat it does
Space or yreplace this one, go on to nextReplace this one, go on to next.
Backspace or nskip to next without replacingSkip to next without replacing.
Enterexit query-replaceExit query-replace.
Ctrl + renter recursive edit (C-M-c to exit)Enter recursive edit (C-M-c to exit).

Multiple Windows (23)

ShortcutActionWhat it does
Ctrl + x, 1delete all other windowsDelete all other windows.
Ctrl + x, 5, 1delete all other windows (frame)Delete all other windows (frame).
Ctrl + x, 2split window, above and belowSplit window, above and below.
Ctrl + x, 5, 2split window, above and below (frame)Split window, above and below (frame).
Ctrl + x, 0delete this windowDelete this window.
Ctrl + x, 5, 0delete this window (frame)Delete this window (frame).
Ctrl + x, 3split window, side by sideSplit window, side by side.
Ctrl + Alt + vscroll other windowScroll other window.
Ctrl + x, oswitch cursor to another windowSwitch cursor to another window.
Ctrl + x, 5, oswitch cursor to another window (frame)Switch cursor to another window (frame).
Ctrl + x, 4, bselect buffer in other windowSelect buffer in other window.
Ctrl + x, 5, bselect buffer in other window (frame)Select buffer in other window (frame).
Ctrl + x, 4, ffind file in other windowFind file in other window.
Ctrl + x, 5, ffind file in other window (frame)Find file in other window (frame).
Ctrl + x, 4, rfind file read-only in other windowFind file read-only in other window.
Ctrl + x, 5, rfind file read-only in other window (frame)Find file read-only in other window (frame).
Ctrl + x, 4, drun Dired in other windowRun Dired in other window.
Ctrl + x, 5, drun Dired in other window (frame)Run Dired in other window (frame).
Ctrl + x, 4, .find tag in other windowFind tag in other window.
Ctrl + x, 5, .find tag in other window (frame)Find tag in other window (frame).
Ctrl + x, ^grow window tallerGrow window taller.
Ctrl + x, {shrink window narrowerShrink window narrower.
Ctrl + x, }grow window widerGrow window wider.

Formatting (14)

ShortcutActionWhat it does
Tabindent current line (mode-dependent)Indent current line (mode-dependent).
Ctrl + Alt + \indent region (mode-dependent)Indent region (mode-dependent).
Ctrl + Alt + qindent sexp (mode-dependent)Indent sexp (mode-dependent).
Ctrl + x, Tabindent region rigidly arg columnsIndent region rigidly arg columns.
Alt + ;indent for commentIndent for comment.
Ctrl + oinsert newline after pointInsert newline after point.
Ctrl + Alt + omove rest of line vertically downMove rest of line vertically down.
Ctrl + x or Ctrl + odelete blank lines around pointDelete 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 pointDelete all white space around point.
Alt + Spaceput exactly one space at pointPut exactly one space at point.
Alt + qfill paragraphFill paragraph.
Ctrl + x, fset fill column to argSet fill column to arg.
Ctrl + x, .set prefix each line starts withSet prefix each line starts with.

Case Change (5)

ShortcutActionWhat it does
Alt + uuppercase wordUppercase word.
Alt + llowercase wordLowercase word.
Alt + ccapitalize wordCapitalize word.
Ctrl + x or Ctrl + uuppercase regionUppercase region.
Ctrl + x or Ctrl + llowercase regionLowercase region.

The Minibuffer (8)

ShortcutActionWhat it does
Tabcomplete as much as possibleComplete as much as possible.
Spacecomplete up to one wordComplete up to one word.
Entercomplete and executeComplete and execute.
Alt + pfetch previous minibuffer inputFetch previous minibuffer input.
Alt + nfetch later minibuffer input or defaultFetch later minibuffer input or default.
Alt + rregexp search backward through historyRegexp search backward through history.
Alt + sregexp search forward through historyRegexp search forward through history.
Ctrl + gabort commandAbort command.

Buffers (3)

ShortcutActionWhat it does
Ctrl + x, bselect another bufferSelect another buffer.
Ctrl + x or Ctrl + blist all buffersList all buffers.
Ctrl + x, kkill a bufferKill a buffer.

Transposing (4)

ShortcutActionWhat it does
Ctrl + ttranspose charactersTranspose characters.
Alt + ttranspose wordsTranspose words.
Ctrl + x or Ctrl + ttranspose linesTranspose lines.
Ctrl + Alt + ttranspose sexpsTranspose sexps.

Spelling Check (4)

ShortcutActionWhat it does
Alt + $check spelling of current wordCheck spelling of current word.
Alt + x, ispell-regioncheck spelling of all words in regionCheck spelling of all words in region.
Alt + x, ispell-buffercheck spelling of entire bufferCheck spelling of entire buffer.
Alt + x, flyspell-modetoggle on-the-fly spell checkingToggle on-the-fly spell checking.

Tags (4)

ShortcutActionWhat it does
Alt + .find a tag (a definition)Find a tag (a definition).
Alt + x, visit-tags-tablespecify a new tags fileSpecify a new tags file.
Alt + x, tags-searchregexp search on all files in tags tableRegexp search on all files in tags table.
Alt + x, tags-query-replacerun query-replace on all the filesRun query-replace on all the files.

Shells (5)

ShortcutActionWhat it does
Alt + !execute a shell commandExecute a shell command.
Alt + &execute a shell command asynchronouslyExecute a shell command asynchronously.
Alt + |run a shell command on the regionRun a shell command on the region.
Ctrl + u or Alt + |filter region through a shell commandFilter region through a shell command.
Alt + x, shellstart a shell in window *shell*Start a shell in window *shell*.

Rectangles (6)

ShortcutActionWhat it does
Ctrl + x, r, rcopy rectangle to registerCopy rectangle to register.
Ctrl + x, r, kkill rectangleKill rectangle.
Ctrl + x, r, yyank rectangleYank rectangle.
Ctrl + x, r, oopen rectangle, shifting text rightOpen rectangle, shifting text right.
Ctrl + x, r, cblank out rectangleBlank out rectangle.
Ctrl + x, r, tprefix each line with a stringPrefix each line with a string.

Abbrevs (6)

ShortcutActionWhat it does
Ctrl + x, a, gadd global abbrevAdd global abbrev.
Ctrl + x, a, ladd mode-local abbrevAdd mode-local abbrev.
Ctrl + x, a, i, gadd global expansion for this abbrevAdd global expansion for this abbrev.
Ctrl + x, a, i, ladd mode-local expansion for this abbrevAdd mode-local expansion for this abbrev.
Ctrl + x, a, eexplicitly expand abbrevExplicitly expand abbrev.
Alt + /expand previous word dynamicallyExpand previous word dynamically.

Miscellaneous (3)

ShortcutActionWhat it does
Ctrl + u, numnumeric argumentNumeric argument.
Alt + -negative argumentNegative argument.
Ctrl + q, charquoted insertQuoted insert.

International Character Sets (6)

ShortcutActionWhat it does
Ctrl + x, Enter, lspecify principal languageSpecify principal language.
Alt + x, list-input-methodsshow all input methodsShow all input methods.
Ctrl + \enable or disable input methodEnable or disable input method.
Ctrl + x, Enter, cset coding system for next commandSet coding system for next command.
Alt + x, list-coding-systemsshow all coding systemsShow all coding systems.
Alt + x, prefer-coding-systemchoose preferred coding systemChoose preferred coding system.

Info (4)

ShortcutActionWhat it does
Ctrl + h, ienter the Info documentation readerEnter the Info documentation reader.
Ctrl + h, Sfind specified function or variable in InfoFind specified function or variable in Info.
Spacescroll forwardScroll forward.
Backspacescroll reverseScroll reverse.

Registers (4)

ShortcutActionWhat it does
Ctrl + x, r, ssave region in registerSave region in register.
Ctrl + x, r, iinsert register contents into bufferInsert register contents into buffer.
Ctrl + x, r, Spacesave value of point in registerSave value of point in register.
Ctrl + x, r, jjump to point saved in registerJump to point saved in register.

Keyboard Macros (6)

ShortcutActionWhat it does
Ctrl + x, (start defining a keyboard macroStart defining a keyboard macro.
Ctrl + x, )end keyboard macro definitionEnd keyboard macro definition.
Ctrl + x, eexecute last-defined keyboard macroExecute last-defined keyboard macro.
Ctrl + u or Ctrl + x, (append to last keyboard macroAppend to last keyboard macro.
Alt + x, name-last-kbd-macroname last keyboard macroName last keyboard macro.
Alt + x, insert-kbd-macroinsert Lisp definition in bufferInsert Lisp definition in buffer.

Emacs Lisp (5)

ShortcutActionWhat it does
Ctrl + x or Ctrl + eeval sexp before pointEval sexp before point.
Ctrl + Alt + xeval current defunEval current defun.
Alt + x, eval-regioneval regionEval region.
Alt + :read and eval minibufferRead and eval minibuffer.
Alt + x, load-libraryload a Lisp library from load-pathLoad a Lisp library from load-path.
📜 Source: GNU Emacs Reference Card (version 31), gnu.org. The GNU Emacs reference card for Emacs 31, section by section. Emacs notation is expanded: C-x is Ctrl + x, M-x is Alt + x, and a comma separates keys pressed in sequence (Ctrl + x, Ctrl + f). Checked 2026-09-08. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Frequently Asked Questions

What are the most useful Emacs keyboard shortcuts?

The most essential Emacs shortcuts are: C-x C-s (Save), C-x C-f (Open file), C-x C-c (Quit).

What is the Emacs shortcut for save?

The Emacs shortcut for save is C-x C-s.

What's the fastest way to learn all Emacs shortcuts?

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.

Can I combine Emacs shortcuts with other tools?

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.

Do Emacs shortcuts differ between Windows and Mac?

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.

Related Shortcut Pages

VS Code Jupyter Notebook PyCharm Xcode Neovim / Vim WebStorm

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Reading the notation

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.

Files and quitting

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.

Editing and commands

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.

🤖 Ask AI about Emacs shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok