http://ccrma.stanford.edu/guides/package/emacs/emacs.html1 of 29/16/07 8:18 PM
Emacs Cheat SheetStarting
emacs
>
emacs
to start emacs.
>
emacs filename
to start emacs and load a file
>
emacs -nw filename
to start emacs with no newwindow (load file)
Quitting
X C
quit emacs (Can be usedwith impunity -- thesystem will prompt if theworkspace has not yetbeen saved.)
G
aborts any command inprogress
Help
H T
to see the tutorial
H A
topic
to see help about
topic
X U
undo the last command
Cursor Positioning
F
orforward (right) onecharacter.
B
orback (left) one character
P
orup one character
N
ordown one character
B
left one word
F
right one word
A
to beginning of line
E
to end of line
<
start of document
>
end of document
V
page up
V
page down
L
cursor in middle of screen
U
20
N
advance
20
lines
x w
display the line numberwhere the cursor is located
X
goto-line
999
go to line number
999
Search and Replace
S
patterntext
search for
patterntext
;cursor moves as you type.Press once at thecorrect location
R
patterntext
search backwards for
patterntext
; cursor moves asyou type.
S
search for the nextoccurrence
%
oldstring
newstring
Search for
oldstring
andreplace it with
newstring
.
Regions
SPC
set mark at cursor
W
kill region
W
copy region to kill ring
Y
yank back last thing killed
Loading and Saving
X F
filename
create new
filename
forediting (clears workspace)
X F
filename
load in
filename
for editing
X W
filename
write (save) as
filename
X S
resave under the currentfilename (based on aboveor name given whenstarting
emacs
)