Emacs-reference-card

From UnixWiki

Jump to: navigation, search
Emacs reference card
Files management and general
C-x C-f Open a file
C-x C-s Save the current file
C-x C-w Save as another filename
C-x C-c Exit emacs
Edition commands
C-k Delete end of line
M-d Delete to the end of the word
C-x r k kill selected rectangle
C-x u Undo the last action
M-z char Zap to char (erase everything until char)
M-t Transpose two next words
C-t Transpose two next chars
Selections, copy and paste
M-space Set a mark on the current position
M-w Copy (from the mark to the cursor)
C-w Cut (from the mark to the cursor)
C-y Paste (yank)
Moving in the buffer
M-< Go to beginning of the file
M-> Go to end of the file
C-a Go to beginning of line
C-e Go to end of line
M-a Forward sentence
M-e Backwards sentence
M-f Forward word
M-b Backwards word
M-m Move to first non blank char
Search and replace
C-s Incremental search forward
C-r Incremental search backward
M-% Query replace
M-; add a comment at the end of the line
Buffers and windows
C-x 1 Maximize current buffer
C-x 2 Split the window vertically
C-x 3 Split the window horizontally
C-x k Kill the current buffer
C-x b Show list of buffers
C-x o Go in the other buffer
Developers features
C-c C-q Indent the current function / region
C-c C-c Comment out the selected region
Personal tools
Reference cards