Firstly, some important contextual points re this technique:
- the ziplinking method creates normal text links, i.e. originating from anchor text in the note's $Text
- the method is optimised for key-board-only use, i.e. for the touch typist, as a text link can be created without use of the trackpad or mouse
- there is no specific type of link that is a 'ziplink'. Once created, the link is indistinguishable from all other text links. Indeed, once the ziplinking method has been used, the link anchor is no different from any other text link anchor, i.e. the ziplinking method does not create a special type link. Thinking of 'ziplinks' is a path to confusion
- this method is an updated replacement for the old Quick Links method of rapid link creation.
This method is particularly useful for adding references to glossary terms, frequently-used sources, or oft-mentioned people and places; in fact anything where the destination note name makes logical anchor text for the link.
Creating a new link (and possibly note) using the ziplinks method
To use this method to make a named note, precede the name of the note with two square brackets and follow its name with two square brackets like this [[like this]]
. If there is no note with this name in the document, Tinderbox will create one as the sibling of the note being editing creating a text link with the new note's $Name as the anchor text. Otherwise, if that note exists, a text link is created to the matched note.
Notes created via this method observe document settings to expand vertically or horizontally if additional space is required for the name. In addition, such notes are positioned to avoid adornments as well as other notes.
The new note's $CreatedFrom attribute contains the path to the note that created the note (i.e. the source of the creating text link).
Option-clicking in the note name popup menu autocompletes the chosen target but leaves the creation process open for further editing. For example, after typing [[tar
and then choosing "target" from the popup while pressing the option key, the text will read [[target
and wait for you to complete the link.
The menu Format ▸ Text ▸ Ziplinks toggles whether the selected note(s) allow link creation via the ziplinking method ($Ziplinks).
Keystrokes and syntax for text link creation via the Ziplinking method
Once links creation is invoked the following logic applies:
[[
shows a list of all notes in the current document.
[[D
shows a list of all notes with names that contain a "d" (case-insensitive match).
In documents with many notes it makes sense to type a few characters to avoid excessive numbers of possible matches being listed.
When typing link input, Tinderbox will show a pop-up list of related note names to the left of the text pane; the list displays all notes that contain the input string, not just those that begin with the string. Choose any of these listed notes to make the link (without further typing); or, press the up-arrow or down-arrow keys to select the preferred target note then press the Return key (↩) to complete the link. In more detail:
- Pressing down-arrow (↓) selects the first target, and pressing down-arrow (↓) again selects the second target.
- Return ( ↩) completes the link to the selected target.
- Option-Return ( ⌥+↩) is now accepted as equivalent to option-clicking on the list; the target is copied to the current link but the link remains open, allowing you to add other options.
- When typing link input, you can choose a listed target option by pressing Tab key (⇥) if either:
- there is only one choice in the match menu
- an item in the pop-up menu has been selected with the up-arrow and down-arrow keys.
- When typing the start of link input, e.g.
[[A
, Tinderbox shows all notes in the document starting with A. Typing[[/container/A
, Tinderbox shows only notes in the specified container. To see a list of just those notes that are siblings of this note, type[[./A
(note the full stop before the slash character). For more see section 'Linking to a note in a specified container', below. - When typing link input, the popup menu displays names of containers in bold. Selecting a container from the match menu does not close the link input immediately. Instead, a new menu of items inside the container appears. Type closing brackets "]]" to link to the container, or select any note or container inside that container from the menu.
- When typing link input, Tinderbox prefers to link to the original note rather than an alias. Pressing the Tab key (⇥) selects the option currently selected in the popup menu. If no item is selected but there is only one item in the menu, pressing the Tab key (⇥) selects it. If there are several items in the menu but none is selected, the Tab key (⇥) selects the first item.
- Each item in the match popup menu shows a tool tip with the note's full path.
Linking to a note in a specified container
If wishing to use the method make a link to a note in a different container, type the container path in the link input:
[[/container/note]]
Additional logical syntax applies when typing paths:
[[/
shows a list of all top-level containers.
[[/D
shows a list of all top-level notes that begin with a "d" (case-insensitive match).
[[/Dog/
shows a list of all notes in /Dog.
[[/Dog/R
shows a list of all notes in /Dog that begin with "r".
[[./
shows a list of all siblings of this note.
[[../
shows the parent of this note and all the parent's siblings.
Locale-based sorting of target option listings. When typing link input on an English locale system, diacritics are ignored when looking for matches. However, the match popup menu takes into account the user's locale, so 'étude' will sort appropriately for French users and 'Ångstrom' will sort correctly in Norway. Bear in mind the process works off the OS locale so if working under one locale and using accented characters from a different language/locale sorting is still locale based.
Link type. A link created via this method always has no link type assigned, or rather the type "*untitled" (i.e. no link type). If needed, use the Browse Links or Roadmap dialogs to set a different link type.
Adding anchor text for the new link
The method syntax allows for specifying link anchor text, using a pipe ('|') symbol delimiter. The following will replace the brackets with the anchor text and link it to the designated note.:
[[note name|anchor text]]
If also needing to specify additional $Text for the note (see below), it goes after the optional anchor text:
[[note name|anchor::text]]
Adding text to the target note
To aid rapid note-taking, it is possible to also set or add to the $Text of a the link's target note:
[[note::some new text]]
If the note already exists, the new text is appended to the note's existing $Text. Otherwise, the supplied text forms the entire $Text of the new note; where no text is supplied, new notes generated by this method have no $Text.
There is no limit on the size of the link input string. Previously it was limited to 50 chars. If needing to add more target text than is currently supported, there is a simple alternative. Use the link method to create a link without adding any text. Then click the link. This navigates to the link target. Now add the desired $Text. Then use shortcut ⌘+' to navigate back to the original note. These navigation controls are also accessible from the Note menu.
Target note name and anchor text
WARNING: even if not using the ziplinking link-creation feature, changing a note name will affect link anchors pointing to that note, as described here.
Making a backlink from the link target
The method can create backlinks from the destination note. [[<that note>]] will create a link to "that note", and then will append the name of this note to the text of "that note" and link the name back to this note. The mark-up needed is used as a wrapper around the entire input string. Thus:
[[<New Idea>]]
…will create a new note called 'New Idea' and link to it. If this method is mixed with other syntax variations, like so:
[[<New Idea|great idea::Recent innovation>]]
…will create a new note called 'New Idea' and link to it via anchor text 'great idea' and add a backlink with the anchor text 'Recent innovation'.
IMPORTANT: note how the closing '>' comes at the end, immediately before the closing ']]' and not before the '|' as might be assumed if all the different parts of syntax were just chained.
Stamps and use of the Ziplinking method
If a stamp changes the text, Tinderbox will immediately expand any ziplinking-style mark-up found in the revised text; i.e. it will parse the syntax and use the ziplinks method to create new text link(s).
Suppressing the Ziplinking feature
It can be useful to disable this feature in notes using code examples or square brackets, and the system attribute $Ziplinks supports this behaviour. Built-in prototypes, such as 'HTML' and 'Code' have $Ziplinks set to false
for just such a reason.
Quick links behaviour, in older versions
The previous 'Quick links' behaviour using a "[[" trigger is described separately.
Presetting prototypes and locations
These 9.5.0 features can also be used when naming new notes.
Prototypes. The zip syntax '[[bridge#pStructure]]' makes a link to note 'bridge' and sets its prototype to 'pStructure'. If no such prototype exists, a new prototype is made in the default, i.e. /Prototypes
, Prototypes container. Specify a note’s prototype by adding the prototype name after the # sign. For example, naming a note “Henderson#Person” will name the note "Henderson" and assign it a prototype of "Person". If no such prototype exists, one will be created in /Prototypes. If the prototype container /Prototypes does not exist, it will be created.
Addresses. The zip syntax '[[bridge@Brooklyn]]' makes a link to note 'bridge'. If a note named 'Brooklyn' exists, 'bridge' takes its $Address from 'Brooklyn'. If no such note exists, the $Address of 'bridge' address is set to that of 'Brooklyn'. Specify a note’s location by adding its address, or the name of a note that represents the location, after the @ sign. For example, “Eastgate@134 Main St., Watertown MA USA” would create a note named Eastgate and set its address, and a note named "John@Boston Office" would make a note named "John" and assign the Address of that note from the address of the note named "Boston Office".