Skip to content

↑↓ moveEnter openEsc close

Emacs keyboard shortcuts cheat sheet

Every default Emacs shortcut on one printable page. Choose your system, then print or save as PDF.

GNU Emacs keyboard shortcuts

Windows · version 30.1 · 62 shortcuts

Hotkeypediahotkeypedia.com

Files and buffers

  • Open (find) a fileCtrlX,CtrlFCtrlX,CtrlFCtrlX,CtrlF
  • Save the bufferCtrlX,CtrlSCtrlX,CtrlSCtrlX,CtrlS
  • Save as (write file)CtrlX,CtrlWCtrlX,CtrlWCtrlX,CtrlW
  • Save all buffersCtrlX,SCtrlX,SCtrlX,S
  • Switch to another bufferCtrlX,BCtrlX,BCtrlX,B
  • List all buffersCtrlX,CtrlBCtrlX,CtrlBCtrlX,CtrlB
  • Close (kill) a bufferCtrlX,KCtrlX,KCtrlX,K
  • Quit EmacsCtrlX,CtrlCCtrlX,CtrlCCtrlX,CtrlC

Commands

  • Run a command by nameOptionXAltXAltX
  • Cancel the current commandCtrlGCtrlGCtrlG
  • UndoCtrl/orCtrlX,UCtrl/orCtrlX,UCtrl/orCtrlX,U
  • RedoCtrlShift/CtrlShift/CtrlShift/
  • Repeat or modify the next commandCtrlUCtrlUCtrlU

Moving

  • Forward one characterCtrlFCtrlFCtrlF
  • Back one characterCtrlBCtrlBCtrlB
  • Next lineCtrlNCtrlNCtrlN
  • Previous lineCtrlPCtrlPCtrlP
  • Forward one wordOptionFAltFAltF
  • Back one wordOptionBAltBAltB
  • Start of the lineCtrlACtrlACtrlA
  • End of the lineCtrlECtrlECtrlE
  • Start of the bufferOptionShift,AltShift,AltShift,
  • End of the bufferOptionShift.AltShift.AltShift.
  • Scroll down a screenCtrlVCtrlVCtrlV
  • Scroll up a screenOptionVAltVAltV
  • Recenter the screen on the cursorCtrlLCtrlLCtrlL
  • Go to a line numberOptionG,GAltG,GAltG,G
  • Forward one paragraphOptionShift]AltShift]AltShift]
  • Back one paragraphOptionShift[AltShift[AltShift[

Editing

  • Delete the next characterCtrlDCtrlDCtrlD
  • Delete (kill) the next wordOptionDAltDAltD
  • Delete (kill) the previous wordOptionBackspaceAltBackspaceAltBackspace
  • Kill to the end of the lineCtrlKCtrlKCtrlK
  • Set the mark (start a selection)CtrlSpaceCtrlSpaceCtrlSpace
  • Select the whole bufferCtrlX,HCtrlX,HCtrlX,H
  • Cut (kill) the selectionCtrlWCtrlWCtrlW
  • Copy the selectionOptionWAltWAltW
  • Paste (yank)CtrlYCtrlYCtrlY
  • Replace the paste with an older killOptionYAltYAltY
  • Open a new line after the cursorCtrlOCtrlOCtrlO
  • Swap two charactersCtrlTCtrlTCtrlT
  • Swap two wordsOptionTAltTAltT
  • Uppercase the wordOptionUAltUAltU
  • Lowercase the wordOptionLAltLAltL
  • Capitalize the wordOptionCAltCAltC
  • Comment or uncommentOption;Alt;Alt;
  • Rewrap the paragraphOptionQAltQAltQ
  • Expand the word from other textOption/Alt/Alt/

Search and replace

  • Search forward as you typeCtrlSCtrlSCtrlS
  • Search backward as you typeCtrlRCtrlRCtrlR
  • Search with a regular expressionCtrlOptionSCtrlAltSCtrlAltS
  • Find and replace, asking each timeOptionShift5AltShift5AltShift5

Windows

  • Split the window top and bottomCtrlX,2CtrlX,2CtrlX,2
  • Split the window side by sideCtrlX,3CtrlX,3CtrlX,3
  • Go to the other windowCtrlX,OCtrlX,OCtrlX,O
  • Close this windowCtrlX,0CtrlX,0CtrlX,0
  • Close every other windowCtrlX,1CtrlX,1CtrlX,1

Macros and help

  • Start recording a macroF3orCtrlX,Shift9F3orCtrlX,Shift9F3orCtrlX,Shift9
  • Stop recording, or run the macroF4F4F4
  • What does this key do?CtrlH,KCtrlH,KCtrlH,K
  • Describe a functionCtrlH,FCtrlH,FCtrlH,F
  • Open the Emacs tutorialCtrlH,TCtrlH,TCtrlH,T
Default bindings for GNU Emacs, version 30.1, checked against GNU Project's documentation.hotkeypedia.com/emacs/cheat-sheet/

Every default GNU Emacs shortcut in version 30.1, in the same groups as the full list. Pick a system, then print. The sheet is sized to fill a portrait A4 or Letter page (two pages for the longest apps); choose "Save as PDF" in the print dialog for a file. Rows showing a dash have no default binding on that system.