Emacs Cheat Sheet

Basic Survival Commands
% emacs Invoke from command shell
C-x C-c Exit
C-g Clear command state
C-u or C-_ Undo
C-h C-h Help on help
C-h a command Help apropos
Emacs Notation and Lingo
C-char Control-char
If Alt key is present, hold down Alt while typing char.
If no Alt key, type ESC key and then char.
ESC Escape key. Generally, any one of Esc, F11, or C-[ .
Kill Remove from currently active buffer and append to paste buffer.
Equivalent to "Cut" in other editors.
sentence In a text buffer: anything that ends with a period.
In a program buffer: anything enclosed in () or {} or [].
window an on-screen view of a buffer.
buffer an in-memory version of a file, or the terminal window for a utility.
Navigation & Kill
Navigation Kill
Where to Backward Forward Backward Forward
anywhere in window mouse click
next character C-b C-f Rubout (not saved) C-d
next word M-b M-f M-Rubout M-d
end of line C-a C-e C-k
next line C-p C-n
next screen M-v C-v
next sentence M-e M-a M-k
end of buffer M-< M->
next occurrence of
search string
C-r C-s
(set with C-@)
C-x C-x C-w
numbered line C-x g number
compiler error C-x `
Buffer & Window Operations
Operation Window Buffer
create new C-x 2 (horiz)
C-x 5 (vert)
C-x C-f filename
delete C-x 0 C-x k
delete other C-x 1
save C-x C-s
save as C-x C-w filename
include file C-x C-i filename
cursor to next window C-x o
or mouse click
save all (query) C-x s y y ...
show in window C-x b buffername
(defaults to previous)
list (look at screen) C-x C-b
Other Useful Commands
C-y paste kill buffer
C-x m Compose mail message
C-c C-s Send mail
C-x c Compile
M-x commandname CR Use named command
C-q char Insert literal char
C-z q Fill current paragraph
C-u 1 2 3 command Repeat count
C-x ( keystrokes C-x ) Define Macro
C-e Execute Macro
C-x c
or M-x compile CR
Invoke make
M-x kill-compiler CR Kill compile
M-x load-lib decladebug CR
start decladebug
M-x dbx-stop-at set break point at current cursor position

Copyright 1998 John Hainsworth. All rights reserved.