Craig's Handy "emacs" Guide CURSOR POSITIONING C-v go forward a page ESC v go backward a page (also Meta-V on X-terms, same with most ESC cmds) C-n go down one line (faster than Cursor-Down(?)) C-p go up one line (faster than Cursor-Up(?)) C-l make current cursor row be displayed in the middle of the screen C-u give numerical argument/repetition count to the next command ESC > go to the bottom of the document (Meta->) ESC < go to the top of the document (Meta-<) ESC x goto-line goto given line number of file (Meta-x) ESC f go forward one word (Meta-f) ESC b go backward one word (Meta-b) C-a go to the first column of the current line C-e go to the last column of the current line TEXT MODIFICATION C-_ undo the last change (may be Ctrl-? on some terminals) (repeatable) C-q insert the character of the next keystroke verbatim C-d delete the character under the cursor DEL detete the character immediately before the cursor (BS doesn't work!) ESC DEL delete the word immediately before the cursor (Meta-DEL) C-t transpose the two characters immediately before the cursor C-x C-l or C-u set the case (lower/upper) of the marked region C-@ set marker to the current location (region is between mark and cursor) C-x C-x exchange current location and mark C-w delete text from current location to marker into the kill buffer ESC w copy text from current location to marker into the kill buffer (Meta) C-k delete to the end of the current line, delete line if already empty C-y "yank" (insert) the text in the kill buffer at the cursor location SEARCH AND REPLACE C-s incremental search forward (type string, DEL, C-s, RETURN(?)) C-r incremental search backward ESC % replace-string RET string RET newstring RET Query-Replace every occurrence of string with newstring. (y/SPACE=yes, n/DEL=no, !=replace all remaining occurrences, q/ESC=quit) FILE / WINDOW / BUFFER OPERATIONS C-x C-c exit from emacs C-x C-s save text to a file C-x C-w write text to a named file (then enter filename) C-x C-f find file (possibly in a buffer) (SPACE=show, TAB=complete, RETURN) C-x o cycle through the windows on the screen (not the buffers) (cmd is oh) C-x 0 close current window (cmd is zero) C-x b find a buffer, edit it in the current window C-x k kill current buffer/window C-x C-b list all buffers (opens/uses second window on screen) C-x i insert a named file at the cursor position MISCELLANEOUS C-g abort current emacs command C-h help (a most unfortunate choice of key) ESC x execute macro ESC ! execute shell command ESC x shell execute sub-shell in current window C-x ( start defining a keyboard macro C-x ) finish defining a keyboard macro C-x e execute last defined keyboard macro (use with C-u to repeat) ESC ~ set file status to not-modified