Emacs Crib Sheet

C-<chr> means holding any control key while typing the contents of <chr>.

M-<chr> means holding any meta or alt key while typing the contents of <chr>. Alternative press and release the escape key (=ESC) and the type the contents of <chr>.

    Basic Emacs Commands
    1. Quit session.
      1. C-x C-c

    2. Quit partially entered command.
      1. C-g

    3. Close current window.
      1. C-x k

    4. Close all windows except current.
      1. C-x 1

    5. Edit content.
      1. Just start typing without using C, M and ESC. Other keys have standard special meaning i.e. pressing delete key deletes the next character.

      2. Undo or Redo
        1. C-7

      3. Reverse default Undo direction.
        1. C-g

      4. Save file.
        1. C-x C-s

    6. Navigation
      1. Cursor
        1. Move by character.
          1. <Arrow Keys>

        2. Move by words.
          1. M-<Arrow Keys>

        3. Move to start of line.
          1. <Pos 1 key>

        4. Move to end of line.
          1. <End Key>

      2. Page
        1. Next Page
          1. C-v or Page Up

        2. Previous Page
          1. M-v or Page Down

        3. Move screen so cursor is in the middle.
          1. C-l

      3. Search
        1. Forward
          1. C-s <search-term> Enter

        2. Backward
          1. C-r <search-term> Enter

    7. Help
      1. C-h

    Alternative Emacs Commands with bad special keys.
    1. Navigation
      1. Cursor
        1. up
          1. C-p (p=previous)

        2. down
          1. C-n (n=next)

        3. left
          1. C-b (b=backward)

        4. right
          1. C-f (f=forward)

Emacs's GUI can be started with emacs. Emacs's TUI can be started with emacs --no-window-system.