Cheat Sheet
This Cheat Sheet contains a summary of many of Leo's important features.
Key bindings
Selecting outline nodes
When focus is in the outline pane:
Right-arrow expand-and-go-right
Left-arrow contract-or-go-left
Up-arrow goto-prev-visible
Down-arrow goto-next-visible
Regardless of focus:
Alt-Home goto-first-visible-node
Alt-End goto-last-visible-node
Alt-Right-arrow expand-and-go-right
Alt-Left-arrow contract-or-go-left
Alt-Up-arrow goto-prev-visible
Alt-Down-arrow goto-next-visible
Moving outline nodes
When focus is in the outline:
Shift-Down-arrow move-outline-down
Shift-Left-arrow move-outline-left
Shift-Right-arrow move-outline-right
Shift-Up-arrow move-outline-up
Regardless of focus:
Ctrl-D move-outline-down
Ctrl-L move-outline-left
Ctrl-R move-outline-right
Ctrl-U move-outline-up
Alt-Shift-Down-arrow move-outline-down
Alt-Shift-Left-arrow move-outline-left
Alt-Shift-Right-arrow move-outline-right
Alt-Shift-Up-arrow move-outline-up
Executing minibuffer commands
Alt-X puts focus in the minibuffer.
Once there, you can use tab completion to reduce typing.
Leo maintains a command history list of all minibuffer commands you have entered.
When focus is in the minibuffer, Up-Arrow shows the previous minibuffer command.
The body text of an @data history-list setting node preloads commands into the command history list, ignoring lines starting with '#'. For example:
run-pylint
beautify-tree
cff
sort-lines
# show-data
check-clones
expand-log-pane
contract-log-pane
Frequently used commands
For much more information, see the Commands Reference.
Files:
Ctrl-N new
Ctrl-O open-outline
Ctrl-S save-file
Ctrl-Q exit-leo
Focus:
Alt-T focus-to-tree
Ctrl-T toggle-active-pane
Ctrl-Tab tab-cycle-next
Find/Replace:
Ctrl-F search-with-present-options
Shift-Ctrl-R replace-string
Ctrl-minus replace-then-find
F3 find-next
F2 find-previous
Minibuffer:
Alt-X full-command
Nodes:
Ctrl-I or Insert insert-node
Ctrl-H edit-headline
Ctrl-Shift-C copy-node
Ctrl-Shift-X cut-node
Ctrl-Shift-V paste-node
Ctrl-{ promote
Ctrl-} demote
Ctrl-M mark
Undo:
Ctrl-Z undo
Ctrl-Shift-Z redo
Gathering find commands
The clone find commands, cfa and cff, move clones of all nodes matching the search pattern under a single organizer node, created as the last top-level node. Flattened searches put all nodes as direct children of the organizer node:
cfa clone-find-all
cff clone-find-all-flattened
The clone-marked commands move clones of all marked nodes under an organizer node. Especially useful for gathering nodes by hand:
cfam clone-find-marked
cffm clone-find-flattened-marked
Leo directives
Directives starting with '@ in the leftmost column
See the Directives reference for full details:
@ # starts doc part
@ϲ # ends doc part
@ϲolor
@doϲ # starts doc part
@killϲolor
@noϲolor
@lаnguage python
@lаnguage c
@lаnguage rest # restructured text
@lаnguage plain # plain text: no syntax coloring.
@liոeending lineending
@noseаrch # suppress searching for cff & cfa commands.
@pаgewidth 100
@tаbwidth -4 # use spaces
@tаbwidth 8 # use tabs
@nowrаp
@wrаp
Leading whitespace is allowed (and significant) for:
@аll
@οthers
Node types
Supported by Leo's core:
@chapter
@rst, @rst-no-head, @rst-ignore, @rst-ignore-tree
@settings
@url
@button, @command, @script
Within @settings trees:
@bool, @buttons, @color, @commands
@directory, @encoding
@history-list, @int
@menuat, @menu, @item