1.Using chapters
Chapters are regions of a Leo outline whose root is an @chapter node. They are available in an outline if the @bool usechapters option is True. @chapter nodes may appear anywhere in an outline, but the create-chapter command (see below) creates @chapter nodes as children of the first @chapters (note the s) node in the outline.
One selects a chapter with the select-chapter command, after which Leo shows only the nodes in the selected chapter; in this respect, chapters are like hoists. The main chapter represents the entire outline and can not be deleted by name. When chapters are in effect, Leo creates an @chapters node for the use of create-chapter.
Associated settings:
- The @bool use_chapters setting determines whether chapters are enabled.
- The @bool use_chapter_tabs setting determines whether the chapters pop-up menu appears in the icon area. Choosing a chapter name from this list selects a chapter.
When chapters are enabled, the Cmds->Chapters menu shows all available chapter commands:
- The chapter-create command creates an @chapter node and populates it with a single node.
- The chapter-remove command deletes the currently selected chapter.
- The chapter-select command prompts for a chapter name and makes only the nodes of the selected chapter visible.
- The chapter-move-node-to, chapter-clone-node-to and chapter-copy-node-to commands prompt for a chapter name and add the currently selected node (and its descendants) to another chapter.
2.Using URLs
Leo highlights URLs whenever syntax is coloring is enabled.
Ctrl-Left-Click (open-url-under-cursor) opens the URL under the cursor.
The open-url command opens a URL appearing either in the headline or the first line of body text.
If a headline starts with @url, the rest of the headline is take to be a url.
Leo opens URLs that look like file names using os.startfile.
Leo opens all other URLs with your default web browser.
Any scheme (http, mailto, ftp, file, etc.) supported by your browser is valid.
URL’s should contain no spaces: use %20 instead of spaces.
See the Appendix for a complete description of valid URLs.
3.Clones
Please take a few moments to experiment with clones:
- Create a node whose headline is A.
- Ctrl-` (clone-node) clones node A.
- Type some text into the body of A.
- All clones of A now have the same body.
- Insert a node, say B, as a child of any of the A nodes.
- All the A nodes now have a B child.
- See what happens if you clone B.
- See what happens if you insert, delete or move nodes that are children of A.
- When you delete a node’s penultimate clone, the last clone becomes a regular node again.
4 Using abbreviations and templates
Leo optionally expands abbreviations as you type.
Abbreviations typically end with something like ”;;” so they won’t trigger by accident.
You define abbreviations in @data abbreviations nodes or @data global-abbreviations nodes.
None come predefined, but leoSettings.leo contains example abbreviations in the node:
Abbreviations can simply be shortcuts:
Abbreviations can span multiple lines. Continued lines start with \:, like this:
Abbreviations can define templates in which <|a-field-name|> denotes a field to be filled in:
Typing ”,,” after inserting a template selects the next field.
Abbreviations can execute abbreviation scripts, delimited by {|{ and }|}:
For example, typing ts;; gives:
It’s even possible to define a context in which abbreviation scripts execute.
See leoSettings.leo for full details.