Emacs Cheat Sheet

ADVERTISEMENT

Emacs Cheatsheet
DOCUMENT KEY
C
The control key.
M
The "meta" key-usually mapped to pressing (and releasing) the Esc key once (sometimes
Alt).
C-<key>
Hold the control key, and press <key>.
M-<key>
Press the Esc key once, and press <key>.
M-h P
Built-in package documentation.
FILES AND BUFFERS
C-x C-f
read a file into a buffer
C-x C-s
save current buffer back to file
C-x C-c
exit emacs
TEXT EDITING
C-k
erases to end of line. If line is blank, the line itself is erased.
C-x u
undo last change to buffer.
C-w
cut marked region
M-w
copy marked region
C-y
paste region
M-x indent-region
indents selected region
C-d
delete the character at the point
<DEL>
delete the character before the point (i.e., backspace)
MARKING
C-SPACE or C-@
set mark
M-h
mark paragraph
C-M-h
mark function
C-x h
mark buffer
SPELLING
M-$
check spelling of word, offers suggestions
M-x flyspell-prog-mode
enable/disable Flyspell mode for comments and strings
M-x flyspell-mode
enable/disable Flyspell mode (highlights misspelled words)
M-/
completes partial word from cursor position
M-x ispell
spellcheck the active region or the current buffer
M-x ispell-buffer
M-x ispell-region
SEARCHING AND REPLACING
C-s
search forward
C-r
search backward
M-x count-matches
Prints the number of occurrences of a regular expression.

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2