emacs commands

C-h C-h : help

C-h r : read manual

C-h k : show doc for command associated with any key

C-g : the quit command

C-x b : switch buffers

C-x right : right-cycle through buffers

C-x left : left-cycle through buffers

C-x k : kill buffer

C-x 0 : close the active window

C-x 1 : close all windows except the active window

C-x 2 : split the active window vertically into two horizontal windows

C-x 3 : split the active window horizontally into two vertical windows

C-x o : change active window to next window

C-x C-f : open file

C-x C-s : save file

C-x C-w : save file as

C-space : set region mark

C-w : kill region (cut)

C-k : kill region between point and end of current line

M-w : kill region without deleting

C-y : yank region from kill ring

M-y : move to previous item in the kill ring

M-Y : move to next item in the kill ring

C-s : search forwards

C-r : search backwards

M-% : query replace (‘space’ to replace, ‘n’ to skip, ‘!’ to replace all)

M-q : wrap text

C-left : move one word left

C-right : move one word right

C-up : move one paragraph up

C-down : move one paragraph down

home : move to the beginning of the line

end : move to the end of the line

page up : move up a page

page down : move down a page

M->???: move to end of buffer

M-x ediff : compare two files and highlight their differences

M-x dired : emacs is a file manager

M-g g : Jump to specified line

C-SPC : Set mark to the current location

C-x C-x : Swap point and mark

C-x h : Make region contain the entire buffer ("Select all")

C-x u : Undo (or C-/ or C-_ )

M-x shell : starts a shell

M-x compile : Invokes make

M-x gdb : debugger

M-x grep :

M-x man :

M-x calculator :

M-x calendar :

M-x shell-command or M-!

M-x shell-command-on-region or M-| : exec command, piping in the current region