Assumptions

  • MacOS
  • Doom

Advice

  • Competency with ‘M-x’ and help are core Emacs skills for life. ‘M-x’ should become your command line in Emacs.

Terminology

  • C-: Control
  • SPC: Spacebar
  • M: “Meta”. Maps to the “Option” key on a Mac
  • S-: Shift?
  • RET: Return
  • Mark: one end of the region; the other end is point.
  • Frame: Normally called a “window” for GUI applications. One running instance of an emacs client. Each frame holds at least one window.
  • Buffer: Holds the contents of files that are being visited
  • Window: the area of screen that displays a buffer

Keyboard Shortcuts

Getting Help

  • Important: If stuck in some command and you don’t know how to get out of it: C-g
  • Emacs Tutorial: C-h t
    • ISSUE: Does not work in Doom. You can do M-x and type help-with-tutorial
  • Read the ORG mode documentation in Emacs Info-browser: C-h i.
    • Use TAB to jump from hyperlink

Application Controls

  • Quit Emacs: C-x C-c
  • Run a command: M-x
  • Quit a partially entered command: C-g

Manage Windows

  • Split window vertically: C-x 2
  • Split horizontally: C-x 3
  • Switch between windows: C-x o

File Operations

  • Save current file: C-x C-s
  • Save current changes: C-x s
  • Open / Create Document: C-x C-f
  • Search for file: C-x d (dired)
  • Switch between files (buffers): C-x b
  • Rename a file:
    • Open dired: C-c f d
  • Fuzzy Search: SPC s p
  • Search forwards: C-s
  • Search backwards: C-r

Page down: C-v Page up: M-v

  • Up: u

  • Next: n

  • Previous: p

  • collapse the headings using TAB and navigate through sections using C-c C-p and C-c C-n makes nimble the process of organizing tasks.

Selecting text

  • Set mark: ‘C-SPC’ (M-x set-mark-command)

Edit Text

  • UNDO: C-/
  • Copy (“kill”) a highlighted area: C-w
  • Paste (“yank”): C-y
  • Delete rest of line of text: C-k
  • Delete entire line at once: `C-S-Backspace

Viewing text

  • Overview of document: shift-TAB

Autocompletion

  • Go to next candidate: C-n
  • Go to previous candidate: C-p
  • Complete common: C-SPC
  • Go to next candidate: C-n
    • (evil) Go to next candidate: C-j
  • Go to previous candidate: C-p
    • (evil) Go to previous candidate: C-k
  • Display documentation (if available): C-h
  • Move to previous page of candidates: C-u
  • Move to next page of candidates: C-d
  • Filter candidates: C-s
  • Search candidates with helm/ivy: C-S-s
  • Complete common: C-SPC
  • Complete common or select next candidate: TAB
  • Select previous candidate: S-TAB

Lists & Notes

  • Fold / Unfold: TAB / S-TAB
  • Move a headline up or down: M-up/down
  • Indent/outdent a headline: M-left/right
  • Indent/outdent a tree: M-S-left/right
  • Insert a new headline: M-RET
  • Create a headline of same type: C-RET
  • Set Tag: C-c C-q (org-set-tags-command)

TODOs

  • Create a TODO from this list item: C-c C-t t

  • Add a TODO below: M-shift-RET. You can hit it several times to add several TODOs.

  • Set TODO priority: S-up/down

  • Schedule a task: C-c C-s

    • Schedule task for tomorrow: +1
    • Schedule task for day after tomorrow: +2
    • Schedule task for the 28th: 28
    • Schedule task for Saturday:sat
    • Two Tuesdays from now: 2thu
    • 1 month from now: 1m
  • Set a deadline for a task: C-c C-d (org-deadline)

  • Un-schedule a task (remove schedule date/time): C-u C-c C-s

Agenda

  • Open Agenda: C-c n a
  • Add document to list of agenda files C-c [
  • Remove document from the list of agenda files: C-c ]
  • Add date: C-c .
  • Add time and date: C-u C-c .
  • Stop doing what you are trying to do, escape: C-g

Export

  • Open Export Menu: C-c C-e

Related pages