Repository navigation
What's new
Undo can no longer wipe a note (#32). A note opened by a key press started as an empty editor, and its text arrived as an undoable change, so pressing u right after opening went back to empty and autosave then wrote that over the file. If this happened to you, check the note's history or your backups.
- Undo now stops at the note as you opened it.
- If undo or redo leaves a note blank while its file has text, autosave, closing a tab and quitting no longer write it.
:w,Ctrl+Sand:wqstill can, andggdGis an edit that saves as ever.
Autosave can be turned off (#32). Set [terminal] autosave = false, run zn config set terminal.autosave false, or use the terminal.autosave row in :settings. The default stays on.
:w,Ctrl+S,:wq,:waand:wqasave.:q,:qa,Ctrl+C, closing the last tab showing the note and switching vault refuse while there are unsaved edits.:q!and:qa!discard them.- Any other exit, such as the terminal closing, sends your edits to a recovery copy, not the note.
- Rename, move, trash, task toggle and
$EDITORstill save first, because they act on the file.
gd follows links the way the desktop does (#32, #33).
- A relative link with no
.md, such as[March 31](./Daily/2020-03-31), opens the note instead of saying "Not a note". A path relative to the current note now beats the same path from the vault root. - Destinations with spaces work, with or without angle brackets:
[a](<./My Note>). - A dead relative link asks
Create note "Work/My Note"?and creates the note where the link points. #heading,^blockand#^blockland on their target, on Markdown links and wikilinks, in the editor and in reading mode.[a](#Heading),[[#Heading]]and[[^id]]jump inside the note.- A bare domain such as
[site](google.com)openshttps://google.com.Note.mdandphoto.pngstay local.
Still different from the desktop: vault attachments and files outside the vault from a Markdown link, gating of application schemes, periodic notes from a dead link, [[https://...]], and .base databases.
Fixes
- The README no longer warns that the desktop app drops
[terminal]. Desktop 2.81.0 and later keep it, soautosave = falsesurvives; on an older desktop it is lost when the app savesconfig.toml.
How to test locally
T=$(mktemp -d); mkdir -p "$T/vault/inbox/Daily" "$T/config"
printf '# Keep me\n\nPrecious content line.\n' > "$T/vault/inbox/Keep.md"
printf '# Index\n\n[March 31](./Daily/2020-03-31)\n' > "$T/vault/inbox/Index.md"
printf '# March 31\n' > "$T/vault/inbox/Daily/2020-03-31.md"
ZENNOTES_CONFIG_DIR="$T/config" zn tui --vault "$T/vault"- Open Keep and press
u:Already at oldest change, and the file is intact. Before: the note went empty, and autosave wrote that to disk. - Open Index, move to the link and press
gd: the March 31 note opens. Before: "Not a note". - Add
[terminal]andautosave = falseto$T/config/config.toml, relaunch and edit a note: the text is not on disk until:w, and:qrefuses.