Current Students

Emacs Reference

  1. Text navigation
  2. Numeric arguments to commands
  3. Cancel
  4. Editing
  5. File access
  6. Search
  7. Multiple Windows
  8. Extended commands
  9. Help
  10. Exit

Key strokes

C- press control key + some other key
M-z press meta (alt) key + some other key

Text navigation

C-v move forward one screen
M-v move back one screen
C-l clear screen and move the text around the cursor
C-p move cursor to previous line
C-n move cursor to next line
C-f move cursor forward (character wise)
C-b move cursor back (character wise)
M-f move cursor forward (word wise)
M-b move cursor back (word wise)
C-a move cursor to beginning of the line
C-e move cursor to end of the line
M-a move cursor to beginning of the sentence
M-b move cursor to end of the sentence
M-< go to beginning of file
M-< go to end of file

Numeric arguments to commands

M-<number> numeric argument to command
example 1: M-8 C-f moves cursor forward 8 characters
example 2: M-10 C-v moves screen forward by ten lines

Cancel

C-g cancels the previous command

Editing

<backspace> delete character before cursor
C-d or <delete> delete character after cursor
M-<backspace> kill word after cursor
M-d kill word before cursor
C-k kill from cursor to end of line
M-k kill from cursor to end of sentence
C-y yank killed text back (paste killed text)
M-y yank previously killed text back
C-x u or C-_ undo

File access

C-x C-f find (open) file
C-x C-s save file
Cx C-b list buffers

Search

C-s incremental search

Multiple Windows

C-x 2 split windows
C-x 1 kill all other windows (except current)
C-x o move to the other window

Extended commands

M-x <command-name> extended command
Example 1: M-x replace-string replaces a user defined string
Example 2: M-x shell launches the shell (command interpreter)

Help

C-h ? general help
C-h c <command> name the command
C-h f <function> describe the function
C-h k <command> command documentation
C-h a <keyword> lists the help available for the keyword (apropos)

Exit

C-z suspend the session, which can be recovered by the fg or emacs

commands

C-x C-c Exit emacs

Victor Lazzarini, 1999