Emacs Shortcut Cheatsheet - University of Washington

[Pages:1]Emacs Shortcut Cheatsheet

C-x means: hold Control and x at the same time

M-x means: type escape then x, or Meta and x

Starting Emacs:

start emacs! !

!

Exiting Emacs:

suspend emacs! !

!

exit emacs!

!

!

Files:

read file!

!

!

visit file other window! !

save file!

!

!

insert file! !

!

write buffer to file! !

Getting Help:

first time users!!

!

second time users!

!

help on keystroke!

!

help on function!!

!

man page!

!

!

Error recovery:

abort command! !

!

recover lost file!

!

undo! !

!

!

restore buffer! !

!

redraw screen! !

!

Moving around:! !

!

move by character!

!

move by word! !

!

move by line! !

!

move by sentence!!

!

goto end of line!!

!

move by screen! !

!

top or bottom of buffer! !

center screen here!

!

Marking:

set mark!

!

!

exchange point and mark! !

mark buffer ! !

!

Registers

copy region to reg!

!

get region from reg!

!

emacs

C-z C-x C-c

C-x C-f C-x C-v C-x C-s C-x i C-x C-w

C-h t C-h ? C-h k C-h f M-x manual-entry

C-g M-x recover-file C-_ M-x revert-buffer C-l

Back! C-b! M-b! C-p! M-a! C-a! M-v! C-x [! C-x l

Forth C-f M-f C-n M-e C-e C-v C-x ]

C-space C-x x C-x h

C-x C-x C-x g

Killing and Deleting: ! !

delete character!!

!

delete word! !

!

delete rest of line!

!

sent! !

!

!

region! !

!

!

yank back (replace line cut)!

zap to ! !

!

Transpose

characters!

!

!

words! !

!

!

lines! !

!

!

Back! Forth Delete! C-d M-Del! M-d M-0 C-k! C-k C-x Del! M-k C-w C-y M-z

C-t M-t C-x C-t

Content borrowed and updated (with permission) from Duane A. Bailey's guidelines from 2007.

Searching

forward!!

!

!

backward!

!

!

forward expression!

!

backward expression!

!

exit search! !

!

undo last search char! !

abort search! !

!

Query Replace:

start query replace ! !

query replace word!

!

Once searching...

replace & search!!

!

replace & stay here!

!

backup to previous!

!

ignore and go on!!

!

replace all remaining! !

exit! !

!

!

Multiple Open Windows: keep just this window! ! split window vertically! ! split window horizontal.!! switch to a diff. window!!

Buffers:

switch to another buffer!!

list all other buffers! !

kill this buffer!!

!

minibuffer!

!

!

Within Minibuffer:

complete command!!

!

show completions!!

!

complete and execute! !

previous input ! !

!

next input!

!

!

abort! !

!

!

Keyboard Macros:

start defining! !

!

stop defining! !

!

execute macro! !

!

Compile something

Compile window! !

!

Find next error !!

!

Fun Stuff

dungeon!!

!

!

tetris! !

!

!

hide & seek! !

!

psychotherapy! !

!

gomoku! !

!

!

robot game!

!

!

the snake game! !

!

peg solitare! !

!

C-s C-r C-M-s C-M-r Return Delete C-g

M-% C-u M-%

Space , ^ Delete ! Return

C-x 1 C-x 2 C-x 3 C-x o

C-x b C-x C-b C-x k M-x

Tab ? Return M-p M-n C-q

C-x ( C-x ) C-x e

M-x compile C-x '

M-x dunnet M-x tetris M-x blackbox M-x doctor M-x gomoku M-x landmark M-x snake M-x solitare

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download