Emacs Outline Mode Cheat Sheet
Entering outline mode
To enter outline mode:
M-x outline-mode
Or, add this line to the beginning of the file (can be in a comment):
-*- mode: outline -*-
Format of outlines
Outlines indicate headings by using stars ('*') at the beginning of a line. Use one star for a top-level heading, two stars for a second-level heading and so on. Example:
* 1. Heading Level 1 ** A. Heading Level 2 ** B. Heading Level 2 *** (1) Heading Level 3 * 2. Heading Level 1
There are no "fields" for automatic numbering.
Movement
The following commands are for movement:
| Keystroke | LISP command | Description |
|---|---|---|
| C-c C-n | outline-next-visible-heading | Moves point to the next visible heading line |
| C-c C-p | outline-previous-visible-heading | Moves point to previous visible heading line |
| C-c C-f | outline-forward-same-level | Moves point to next visible heading line at same level |
| C-c C-b | outline-backward-same-level | Moves point to previous visible heading line at same level |
| C-c C-u | outline-up-heading | Moves point up to previous visible super-heading line |
Expanding/collapsing
The following commands are for expanding or collapsing the outline:
| Keystroke | LISP command | Description |
|---|---|---|
| C-c C-t | hide-body | Hides all body lines in the buffer |
| C-c C-a | show-all | Shows all lines in the buffer |
| C-c C-d | hide-subtree | Hides everything under this heading |
| C-c C-s | show-subtree | Shows everything under this heading, including all bodies |
| C-c C-l | hide-leaves | Hides the bodies of the current heading and all its sub-headings |
| C-c C-k | show-branches | Shows all the sub-headings under current heading |
| C-c C-i | show-children | Shows all immediate sub-headings under current heading |
| C-c C-c | hide-entry | Hides body of current heading |
| C-c C-e | show-entry | Shows body of current heading |
| C-c C-q | hide-sublevels | Hides everything except the top n levels of headings |
| C-c C-o | hide-other | Hides everything except the current heading and its super-headings |