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.

macOS Windows Linux
115 shortcuts 12 categories
Visit Emacs Official Website
Show shortcuts for:

Leaving Emacs 1 shortcut

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

Files 6 shortcuts

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

Getting Help 7 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 +H Ctrl +H Ctrl +H
remove help window
Ctrl +X +1 Ctrl +X +1 Ctrl +X +1
scroll help window
Ctrl +Opt +V Ctrl +Alt +V Ctrl +Alt +V
apropos: show commands matching a string
Ctrl +H +A Ctrl +H +A Ctrl +H +A
describe the function a key runs
Ctrl +H +K Ctrl +H +K Ctrl +H +K
describe a function
Ctrl +H +F Ctrl +H +F Ctrl +H +F
get mode-specific information
Ctrl +H +M Ctrl +H +M Ctrl +H +M

Error Recovery 5 shortcuts

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

Incremental Search 9 shortcuts

search forward
Ctrl +S Ctrl +S Ctrl +S
search backward
Ctrl +R Ctrl +R Ctrl +R
regular expression search
Ctrl +Opt +S Ctrl +Alt +S Ctrl +Alt +S
reverse regular expression search
Ctrl +Opt +R Ctrl +Alt +R Ctrl +Alt +R
select previous search string
Opt +P Alt +P Alt +P
select next search string
Opt +N Alt +N Alt +N
exit incremental search
Enter Enter Enter
undo effect of last character
Delete Delete Delete
abort current search
Ctrl +G Ctrl +G Ctrl +G

Motion 28 shortcuts

character
Ctrl +B Ctrl +B Ctrl +B
character
Ctrl +F Ctrl +F Ctrl +F
word
Opt +B Alt +B Alt +B
word
Opt +F Alt +F Alt +F
line
Ctrl +P Ctrl +P Ctrl +P
line
Ctrl +N Ctrl +N Ctrl +N
go to line beginning (or end)
Ctrl +A Ctrl +A Ctrl +A
go to line beginning (or end)
Ctrl +E Ctrl +E Ctrl +E
sentence
Opt +A Alt +A Alt +A
sentence
Opt +E Alt +E Alt +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 +B Ctrl +Alt +B Ctrl +Alt +B
sexp
Ctrl +Opt +F Ctrl +Alt +F Ctrl +Alt +F
function
Ctrl +Opt +A Ctrl +Alt +A Ctrl +Alt +A
function
Ctrl +Opt +E Ctrl +Alt +E Ctrl +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 +V Ctrl +V Ctrl +V
scroll to previous screen
Opt +V Alt +V Alt +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 +L Ctrl +L Ctrl +L
goto line
Opt +G +G Alt +G +G Alt +G +G
goto char
Opt +G +C Alt +G +C Alt +G +C
back to indentation
Opt +M Alt +M Alt +M
The BuildBox Macropad Puts Keyboard Shortcuts at Your Fingertips! Learn More

Killing and Deleting 13 shortcuts

character (delete, not kill)
Delete Delete Delete
character (delete, not kill)
Ctrl +D Ctrl +D Ctrl +D
word
Opt +Delete Alt +Delete Alt +Delete
word
Opt +D Alt +D Alt +D
line (to end of)
Ctrl +Opt +0 +K +K Ctrl +Alt +0 +K +K Ctrl +Alt +0 +K +K
sentence
Ctrl +X +Delete Ctrl +X +Delete Ctrl +X +Delete
sentence
Opt +K Alt +K Alt +K
sexp
Ctrl +Opt +- +K Ctrl +Alt +- +K Ctrl +Alt +- +K
kill region
Ctrl +W Ctrl +W Ctrl +W
copy region to kill ring
Opt +W Alt +W Alt +W
kill through next occurrence of char
Opt +Z +char Alt +Z +char Alt +Z +char
yank back last thing killed
Ctrl +Y Ctrl +Y Ctrl +Y
replace last yank with previous kill
Opt +Y Alt +Y Alt +Y

Marking 9 shortcuts

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

Query Replace 3 shortcuts

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

Multiple Windows 15 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 +1 Ctrl +X +1 Ctrl +X +1
split window, above and below
Ctrl +X +2 Ctrl +X +2 Ctrl +X +2
delete this window
Ctrl +X +0 Ctrl +X +0 Ctrl +X +0
split window, side by side
Ctrl +X +3 Ctrl +X +3 Ctrl +X +3
scroll other window
Ctrl +Opt +V Ctrl +Alt +V Ctrl +Alt +V
switch cursor to another window
Ctrl +X +O Ctrl +X +O Ctrl +X +O
select buffer in other window
Ctrl +X +4 +B Ctrl +X +4 +B Ctrl +X +4 +B
display buffer in other window
Ctrl +X +4 +O Ctrl +X +4 +O Ctrl +X +4 +O
find file in other window
Ctrl +X +4 +F Ctrl +X +4 +F Ctrl +X +4 +F
find file read-only in other window
Ctrl +X +4 +R Ctrl +X +4 +R Ctrl +X +4 +R
run Dired in other window
Ctrl +X +4 +D Ctrl +X +4 +D Ctrl +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 +}

Formatting 14 shortcuts

indent current line (mode-dependent)
Tab Tab Tab
indent region (mode-dependent)
Ctrl +Opt +\ Ctrl +Alt +\ Ctrl +Alt +\
indent sexp (mode-dependent)
Ctrl +Opt +Q Ctrl +Alt +Q Ctrl +Alt +Q
indent region rigidly arg columns
Ctrl +X +Tab Ctrl +X +Tab Ctrl +X +Tab
indent for comment
Opt +; Alt +; Alt +;
insert newline after point
Ctrl +O Ctrl +O Ctrl +O
move rest of line vertically down
Ctrl +Opt +O Ctrl +Alt +O Ctrl +Alt +O
delete blank lines around point
Ctrl +X +O Ctrl +X +O Ctrl +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 +Space Alt +Space Alt +Space
fill paragraph
Opt +Q Alt +Q Alt +Q
set fill column to arg
Ctrl +X +F Ctrl +X +F Ctrl +X +F
set prefix each line starts with
Ctrl +X +. Ctrl +X +. Ctrl +X +.

Case Change 5 shortcuts

uppercase word
Opt +U Alt +U Alt +U
lowercase word
Opt +L Alt +L Alt +L
capitalize word
Opt +C Alt +C Alt +C
uppercase region
Ctrl +X +U Ctrl +X +U Ctrl +X +U
lowercase region
Ctrl +X +L Ctrl +X +L Ctrl +X +L
BuildBox Macropad

We've Built 10s Of 1000s Of Keyboard Shortcuts Into The BuildBox Macropad

The BuildBox Macropad is the ultimate shortcut machine. One device with up to 160 configurable shortcuts for apps like Emacs available at your fingertips, a crystal clear display showing what every key does, and a hall-effect scroll wheel for scrubbing through video, audio and graphic editing applications like butter!

Drop your email below to be eligible for our first production run of 500 BuildBox units, at a HUGE discount price:

Keyboard Shortcuts for Similar Applications