You are on page 1of 2

C-x z - repeat with pressing z

C-_ - undo
Buffers:
C-x b - switch to buffer
C-x 4 b - switch to buffer in new window
C-x 4 f - open file in a new window
C-x k - kill current buffer
M-x kill-some-buffers - kill buffer one by one
Windows:
C-x 2 - split the selected window into 2 windows (vertical)
C-x 3 - split the selected window into 2 windows (horizontal)
C-x o - select another window
C-x 0 - get rid of current window
C-x 1 - get rid of other windows except selected one
Scrolling:
(arg) C-v - scroll forward
(arg) M-v - scroll backward
(arg) C-n - move down (arg) lines

Files:
C-x C-f - open a file
C-x C-s - save the current buffer to it's file
C-x s - save all buffers to files
C-x C-w - save as
Directories:
C-x C-d - list a directory
C-u C-x C-d - list a directory (verbose)

Text editing:
M-del - kill last word
C-t - exchange two characters
M-t - transpose two words
C-M-t - transpose two balanced expressions
C-x C-t - transpose two lines
C-d - delete next character
M-\ - delete spaces and tabs around cursor
M-space - delete spaces and tabs around cursor but leave one spa
ce
M-^ - join two lines
C-k - kill rest of line
M-w - copy
C-w - cut
M-d - kill word
M-del - kill word backward
C-y - paste
C-u C-y - yank/paste last killed text but leave cursor in place
M-y - move yank pointer
M-e - go to end of line
C-M-\ - indent region
Text selecting:
C-space - set marker
C-x C-x - exchange set markers
M-h - select current paragraph
C-x h - select entire buffer
M-x replace-string RET string RET newstring RET - replace
Text searching:
C-s - incremental search forward
C-r - incremental search backward
Help:
C-h a string RET - display a list of commands whose names contain 'string
'.
C-h w command RET - Print which keys run the command named command (where-
is).

You might also like