emacs Quick Reference Guide

Emacs commands are accompanied either by simultaneously holding down the control key (indicated by ctrl) or by first hitting the escape key (indicated by esc).

Essential Commands
ctrlh help
ctrlx u undo
ctrlx ctrlg get out of current operation or command
ctrlx ctrls save the file
ctrlx ctrlc close Emacs
Cursor movement
ctrlf forward one character
ctrlb back one character
ctrlp previous line
ctrln next line
ctrla beginning of line
ctrle end of line
ctrll center current line on screen
ctrlv scroll forward
escv scroll backward
escf forward one word
escb back one word
esca beginning of sentence
esce end of sentence
esc[ beginning of paragraph
esc] end of paragraph
esc< beginning of buffer
esc> end of buffer
Other Important Functions
esc(n) repeat the next command (n) times
ctrld delete a character
escd delete a word
ctrlk kill line
esck kill sentence
ctrls search forward
ctrlr search in reverse
esc% query replace
escc capitalize word
escu uppercase word
escl lowercase word
ctrlt transpose characters
esct transpose words
ctrl@ mark beginning of region
ctrlw cut--wipe out everything from mark to point
ctrly paste--yank deleted text into current location
escq reformat paragraph
escg reformat each paragraph in region
escx auto-fill-mode turn on word wrap
escx set-variable <return> fill-column <return> 45
set length of lines to 45 characters
escx goto-line <return> 16 move cursor to line 16
escw copy region marked
ctrlx ctrlf find file and read it
ctrlx ctrlv find and read alternate file
ctrlx i insert file at cursor position
ctrlx ctrls save file
ctrlx ctrlw write buffer to a different file
ctrlx ctrlc exit emacs, and be prompted to save