1. Home
  2. Keyboard Shortcuts
  3. Emacs
Code Editors & IDEs

Emacs Keyboard Shortcuts

115 shortcuts to edit text with extensible tools faster — the complete Emacs keyboard shortcut reference

Emacs keyboard shortcuts

Emacs is a code editors & IDEs application developed by GNU Project. It lets users edit text with extensible tools with a professional-grade toolset.

Knowing the right keyboard shortcuts turns Emacs into a faster, more responsive tool. It is one of the simplest upgrades to any workflow.

With support for macOS, Windows, and Linux, Emacs reaches a wide range of users. This keyboard shortcuts guide covers the key combinations for each supported platform.

macOSWindowsLinux 115 SHORTCUTS 12 CATEGORIES
VISIT EMACS OFFICIAL WEBSITE ↗
SHOW SHORTCUTS FOR:
Jump to Section (12 sections)

Leaving Emacs1 SHORTCUT

exit Emacs permanently Ctrl+X+CCtrl+X+CCtrl+X+C

Files6 SHORTCUTS

read a file into Emacs Ctrl+X+FCtrl+X+FCtrl+X+F
save a file back to disk / save all files Ctrl+X+SCtrl+X+SCtrl+X+S
insert contents of another file into this buffer Ctrl+X+ICtrl+X+ICtrl+X+I
replace this file with the file you really want Ctrl+X+VCtrl+X+VCtrl+X+V
write buffer to a specified file Ctrl+X+WCtrl+X+WCtrl+X+W
toggle read-only status of buffer Ctrl+X+QCtrl+X+QCtrl+X+Q

Getting Help7 SHORTCUTS

The help system is simple. Type C-h (or F1 ) and follow the di-rections. If you are a first-time user, type C-h t for a tutorial .remove help window Ctrl+HCtrl+HCtrl+H
remove help window Ctrl+X+1Ctrl+X+1Ctrl+X+1
scroll help window Ctrl+Opt+VCtrl+Alt+VCtrl+Alt+V
apropos: show commands matching a string Ctrl+H+ACtrl+H+ACtrl+H+A
describe the function a key runs Ctrl+H+KCtrl+H+KCtrl+H+K
describe a function Ctrl+H+FCtrl+H+FCtrl+H+F
get mode-specific information Ctrl+H+MCtrl+H+MCtrl+H+M

Error Recovery5 SHORTCUTS

abort partially typed or executing command Ctrl+GCtrl+GCtrl+G
undo an unwanted change Ctrl+X+UCtrl+X+UCtrl+X+U
undo an unwanted change Ctrl+_Ctrl+_Ctrl+_
undo an unwanted change Ctrl+/Ctrl+/Ctrl+/
redraw garbaged screen Ctrl+LCtrl+LCtrl+L

Incremental Search9 SHORTCUTS

search forward Ctrl+SCtrl+SCtrl+S
search backward Ctrl+RCtrl+RCtrl+R
regular expression search Ctrl+Opt+SCtrl+Alt+SCtrl+Alt+S
reverse regular expression search Ctrl+Opt+RCtrl+Alt+RCtrl+Alt+R
select previous search string Opt+PAlt+PAlt+P
select next search string Opt+NAlt+NAlt+N
exit incremental search EnterEnterEnter
undo effect of last character DeleteDeleteDelete
abort current search Ctrl+GCtrl+GCtrl+G

Motion28 SHORTCUTS

character Ctrl+BCtrl+BCtrl+B
character Ctrl+FCtrl+FCtrl+F
word Opt+BAlt+BAlt+B
word Opt+FAlt+FAlt+F
line Ctrl+PCtrl+PCtrl+P
line Ctrl+NCtrl+NCtrl+N
go to line beginning (or end) Ctrl+ACtrl+ACtrl+A
go to line beginning (or end) Ctrl+ECtrl+ECtrl+E
sentence Opt+AAlt+AAlt+A
sentence Opt+EAlt+EAlt+E
paragraph Opt+{Alt+{Alt+{
paragraph Opt+}Alt+}Alt+}
page Ctrl+X+[Ctrl+X+[Ctrl+X+[
page Ctrl+X+]Ctrl+X+]Ctrl+X+]
sexp Ctrl+Opt+BCtrl+Alt+BCtrl+Alt+B
sexp Ctrl+Opt+FCtrl+Alt+FCtrl+Alt+F
function Ctrl+Opt+ACtrl+Alt+ACtrl+Alt+A
function Ctrl+Opt+ECtrl+Alt+ECtrl+Alt+E
go to buffer beginning (or end) Opt+<Alt+<Alt+<
go to buffer beginning (or end) Opt+>Alt+>Alt+>
scroll to next screen Ctrl+VCtrl+VCtrl+V
scroll to previous screen Opt+VAlt+VAlt+V
scroll left Ctrl+X+<Ctrl+X+<Ctrl+X+<
scroll right Ctrl+X+>Ctrl+X+>Ctrl+X+>
scroll current line to center, top, bottom Ctrl+LCtrl+LCtrl+L
goto line Opt+G+GAlt+G+GAlt+G+G
goto char Opt+G+CAlt+G+CAlt+G+C
back to indentation Opt+MAlt+MAlt+M
The BuildBox Macropad Puts Keyboard Shortcuts at Your Fingertips! LEARN MORE →

Killing and Deleting13 SHORTCUTS

character (delete, not kill) DeleteDeleteDelete
character (delete, not kill) Ctrl+DCtrl+DCtrl+D
word Opt+DeleteAlt+DeleteAlt+Delete
word Opt+DAlt+DAlt+D
line (to end of) Ctrl+Opt+0+K+KCtrl+Alt+0+K+KCtrl+Alt+0+K+K
sentence Ctrl+X+DeleteCtrl+X+DeleteCtrl+X+Delete
sentence Opt+KAlt+KAlt+K
sexp Ctrl+Opt+-+KCtrl+Alt+-+KCtrl+Alt+-+K
kill region Ctrl+WCtrl+WCtrl+W
copy region to kill ring Opt+WAlt+WAlt+W
kill through next occurrence of char Opt+Z+charAlt+Z+charAlt+Z+char
yank back last thing killed Ctrl+YCtrl+YCtrl+Y
replace last yank with previous kill Opt+YAlt+YAlt+Y

Marking9 SHORTCUTS

set mark here Ctrl+@Ctrl+@Ctrl+@
set mark here Ctrl+SpaceCtrl+SpaceCtrl+Space
exchange point and mark Ctrl+X+XCtrl+X+XCtrl+X+X
set mark arg words away Opt+@Alt+@Alt+@
mark paragraph Opt+HAlt+HAlt+H
mark page Ctrl+X+PCtrl+X+PCtrl+X+P
mark sexp Ctrl+Opt+@Ctrl+Alt+@Ctrl+Alt+@
mark function Ctrl+Opt+HCtrl+Alt+HCtrl+Alt+H
mark entire buffer Ctrl+X+HCtrl+X+HCtrl+X+H

Query Replace3 SHORTCUTS

interactively replace a text string Opt+%Alt+%Alt+%
using regular expressions Opt+X+query-replace-regexpAlt+X+query-replace-regexpAlt+X+query-replace-regexp
enter recursive edit ( C-M-c to exit) Ctrl+RCtrl+RCtrl+R

Multiple Windows15 SHORTCUTS

When two commands are shown, the second is a similar com-mand for a frame instead of a window. delete all other windows Ctrl+X+1Ctrl+X+1Ctrl+X+1
split window, above and below Ctrl+X+2Ctrl+X+2Ctrl+X+2
delete this window Ctrl+X+0Ctrl+X+0Ctrl+X+0
split window, side by side Ctrl+X+3Ctrl+X+3Ctrl+X+3
scroll other window Ctrl+Opt+VCtrl+Alt+VCtrl+Alt+V
switch cursor to another window Ctrl+X+OCtrl+X+OCtrl+X+O
select buffer in other window Ctrl+X+4+BCtrl+X+4+BCtrl+X+4+B
display buffer in other window Ctrl+X+4+OCtrl+X+4+OCtrl+X+4+O
find file in other window Ctrl+X+4+FCtrl+X+4+FCtrl+X+4+F
find file read-only in other window Ctrl+X+4+RCtrl+X+4+RCtrl+X+4+R
run Dired in other window Ctrl+X+4+DCtrl+X+4+DCtrl+X+4+D
find tag in other window Ctrl+X+4+.Ctrl+X+4+.Ctrl+X+4+.
grow window taller Ctrl+X+^Ctrl+X+^Ctrl+X+^
shrink window narrower Ctrl+X+{Ctrl+X+{Ctrl+X+{
grow window wider Ctrl+X+}Ctrl+X+}Ctrl+X+}

Formatting14 SHORTCUTS

indent current line (mode-dependent) TabTabTab
indent region (mode-dependent) Ctrl+Opt+\Ctrl+Alt+\Ctrl+Alt+\
indent sexp (mode-dependent) Ctrl+Opt+QCtrl+Alt+QCtrl+Alt+Q
indent region rigidly arg columns Ctrl+X+TabCtrl+X+TabCtrl+X+Tab
indent for comment Opt+;Alt+;Alt+;
insert newline after point Ctrl+OCtrl+OCtrl+O
move rest of line vertically down Ctrl+Opt+OCtrl+Alt+OCtrl+Alt+O
delete blank lines around point Ctrl+X+OCtrl+X+OCtrl+X+O
join line with previous (with arg, next) Opt+^Alt+^Alt+^
delete all white space around point Opt+\Alt+\Alt+\
put exactly one space at point Opt+SpaceAlt+SpaceAlt+Space
fill paragraph Opt+QAlt+QAlt+Q
set fill column to arg Ctrl+X+FCtrl+X+FCtrl+X+F
set prefix each line starts with Ctrl+X+.Ctrl+X+.Ctrl+X+.

Case Change5 SHORTCUTS

uppercase word Opt+UAlt+UAlt+U
lowercase word Opt+LAlt+LAlt+L
capitalize word Opt+CAlt+CAlt+C
uppercase region Ctrl+X+UCtrl+X+UCtrl+X+U
lowercase region Ctrl+X+LCtrl+X+LCtrl+X+L

Noticed errors or keyboard shortcuts that don't work? Please let us know about them here →

The BuildBox Macropad Unlocks Thousands of Keyboard Shortcuts For Any App

The BuildBox Macropad
Available early December

That's why the BuildBox Macropad is the Ultimate Shortcut Machine. One device with infinite shortcuts available at your fingertips, plus a HUGE display showing what each key does, and a magnet-powered zero-friction scroll wheel that moves through documents, video, audio and graphic editing apps like butter!

Enter your Email to get your hands on a launch batch BuildBox (limited: 200 available):

Keyboard Shortcuts for Similar Applications