0% found this document useful (0 votes)
79 views1 page

Cheatsheet Emacs PDF

This document provides a summary of keyboard shortcuts for Emacs. It lists shortcuts for searching and replacing text, opening and saving files, getting help, moving around, marking text, killing and deleting text, and more. It also mentions some games that can be played within Emacs like tetris and a dungeon game.

Uploaded by

Jay Laino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views1 page

Cheatsheet Emacs PDF

This document provides a summary of keyboard shortcuts for Emacs. It lists shortcuts for searching and replacing text, opening and saving files, getting help, moving around, marking text, killing and deleting text, and more. It also mentions some games that can be played within Emacs like tetris and a dungeon game.

Uploaded by

Jay Laino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Emacs Shortcut Cheatsheet Content borrowed and updated (with permission)

from Duane A. Bailey’s guidelines from 2007.


C-x means: hold Control and x at the same time
M-x means: type escape then x, or Meta and x

Searching
Starting Emacs:
forward!! ! ! C-s
start emacs! ! ! emacs
backward! ! ! C-r
forward expression! ! C-M-s
Exiting Emacs:
backward expression! ! C-M-r
suspend emacs! ! ! C-z
exit search! ! ! Return
exit emacs! ! ! C-x C-c
undo last search char! ! Delete
abort search! ! ! C-g
Files:
read file! ! ! C-x C-f
Query Replace:
visit file other window! ! C-x C-v
start query replace ! ! M-%
save file! ! ! C-x C-s
query replace word! ! C-u M-%
insert file! ! ! C-x i
write buffer to file! ! C-x C-w
Once searching…
replace & search!! ! Space
Getting Help:
replace & stay here! ! ,
first time users!! ! C-h t
backup to previous! ! ^
second time users! ! C-h ?
ignore and go on!! ! Delete
help on keystroke! ! C-h k
replace all remaining! ! !
help on function!! ! C-h f
exit! ! ! ! Return
man page! ! ! M-x manual-entry
Multiple Open Windows:
Error recovery:
keep just this window! ! C-x 1
abort command! ! ! C-g
split window vertically! ! C-x 2
recover lost file! ! M-x recover-file
split window horizontal.!! C-x 3
undo! ! ! ! C-_
switch to a diff. window!! C-x o
restore buffer! ! ! M-x revert-buffer
redraw screen! ! ! C-l
Buffers:
switch to another buffer!! C-x b
Moving around:! ! ! Back! Forth
list all other buffers! ! C-x C-b
move by character! ! C-b! C-f
kill this buffer!! ! C-x k
move by word! ! ! M-b! M-f
minibuffer! ! ! M-x
move by line! ! ! C-p! C-n
move by sentence!! ! M-a! M-e
Within Minibuffer:
goto end of line!! ! C-a! C-e
complete command!! ! Tab
move by screen! ! ! M-v! C-v
show completions!! ! ?
top or bottom of buffer! ! C-x [! C-x ]
complete and execute! ! Return
center screen here! ! C-x l
previous input ! ! ! M-p
next input! ! ! M-n
Marking:
abort! ! ! ! C-q
set mark! ! ! C-space
exchange point and mark! ! C-x x
Keyboard Macros:
mark buffer ! ! ! C-x h
start defining! ! ! C-x (
stop defining! ! ! C-x )
Registers
execute macro! ! ! C-x e
copy region to reg! ! C-x C-x
get region from reg! ! C-x g
Compile something
Compile window! ! ! M-x compile
Find next error !! ! C-x '
Killing and Deleting: ! ! Back! Forth
delete character!! ! Delete! C-d
Fun Stuff
delete word! ! ! M-Del! M-d
dungeon!! ! ! M-x dunnet
delete rest of line! ! M-0 C-k! C-k
tetris! ! ! ! M-x tetris
sent! ! ! ! C-x Del! M-k
hide & seek! ! ! M-x blackbox
region! ! ! ! C-w
psychotherapy! ! ! M-x doctor
yank back (replace line cut)! C-y
gomoku! ! ! ! M-x gomoku
zap to <char>! ! ! M-z <char>
robot game! ! ! M-x landmark
the snake game! ! ! M-x snake
Transpose
peg solitare! ! ! M-x solitare
characters! ! ! C-t
words! ! ! ! M-t
lines! ! ! ! C-x C-t

You might also like