A Handful of EMACS commands Essentials: ^X^S -> save file (use frequently!) ^X^C -> quit EMACS ^Z -> suspend EMACS (use UNIX 'fg' or 'bg' to restart) ^Xu -> undo last command (repeat as necessary to undo series of commands or keystrokes) ^G -> abort current command Cursor movement: ^N -> next line ^P -> previous line ^F -> forward char ^B -> backward char ^A -> beginning of line ^E -> end of line ^V -> forward page Esc-v -> backward page Esc-< -> go to beginning of file Esc-> -> go to end of file ^L -> refresh screen centered on cursor Modifying text: ^D -> delete character ^space -> set mark ^X^X -> exchange cursor and mark ^K -> "cut" current line ^W -> "cut" marked region Esc-w -> "copy" marked region ^Y -> "paste" (or "yank") previously cut text at cursor. Working with multiple files: ^X I -> insert file at cursor ^X^B -> switch to another active file ^X^F -> create or edit another file Working with multiple windows: ^X2 -> begin split-screen editing ^X1 -> end split-screen editing ^Xo -> go to other window Searching for text strings: ^R -> incremental search (backward) ^S -> incremental search (forward) Search/Replace: Esc-% -> query search/replace Enter search string followed by replacement string Respond to query with to replace, to abort, 'N' to skip, '.' to replace and stop Editing C, FORTRAN, or IDL programs: TAB -> adjust indentation of current line (,),[,],{,} etc. -> typing right bracket, parenthesis, etc., will cause matching left bracket, parenthesis, etc., to be "flashed" Macros (extremely useful for repetitive tasks!): ^X( -> start keyboard macro definition ^X) -> end keyboard macro definition ^Xe -> execute keyboard macro Esc- ^Xe -> repeat macro times Extended commands: Esc- -> repeat following command or keystroke times