nvALT is still a notes app. I don’t intend to make it a fully-fledged Markdown editor. I already had a bunch of this written for the Marked Dingus, though, and once the code existed it was harder to leave it over there than to bring the useful parts across.
These all assume Markdown completion is the way you write. A few of the list tricks also want automatic list formatting turned on, which is the same switch nvALT has used for years.
Lists
Option-Command-L cycles the current line. A plain line becomes a bullet, a bullet becomes a number, and a number goes back to plain text.
Tab and Shift-Tab indent and outdent a list item, a blockquote, or a selection of them. Control-Command-Left and Control-Command-Right indent ordinary lines. The width comes from the tab setting, tabs or spaces.
Numbered lists renumber themselves while you edit, including nested ones. Markdown highlighting colors list markers no matter how far they’re indented.
Option-Command-L used to lock the note to the preview. That menu item is still there. It just doesn’t have the shortcut anymore.
Quotes, fences, and Return
Return on a blockquote continues the quote.
Return on an empty quote line drops the marker and leaves a blank line.
Return on the opening line of a code fence writes the closing fence and leaves the cursor on the blank line between them. Start with:
Press Return and you get:
Select some text and press Option-Command-K. nvALT wraps it in a Markdown link and parks the cursor between the parentheses.
Paste a URL onto a selection and you get the link filled in. Paste a URL by itself and it becomes an autolink, unless you’re already inside a link or a reference definition, in which case you just get the URL.
[nvALT](https://brettterpstra.com/projects/nvalt)
<https://brettterpstra.com/projects/nvalt>
F6 turns a selection into a reference link and adds the definition at the end of the note. Press it again on the marker to jump to the definition, or on the definition to jump back.
[the download][1]
[1]: https://brettterpstra.com/projects/nvalt
F7 does the same job for footnotes. A selection becomes the footnote body. With nothing selected, the marker lands after the word under the cursor.
Still a notes app.[^1]
[^1]: I mean it.
Moving and selecting
Control-Command-Up and Control-Command-Down move the current paragraph. On a list item, they move that item, including anything nested under it.
Option-Command-Up grows the selection by structure: the word, the inside of a pair of markers, the markers themselves, the sentence, the paragraph, the neighboring block, then the whole list, quote, or fence, and finally the note. Option-Command-Down walks back down.
The small stuff
Invisible characters and unusual spaces get a tint in the editor, so a line that looks empty and isn’t will show itself. Zero-width characters, non-breaking spaces, that family of gremlins.
Keyboard Shortcuts opens in its own window now, instead of handing the file to another app.
Since 3.0.4
- Insert a Markdown link with Option-Command-K.
- Paste a URL as a Markdown link when text is selected, or as an autolink when it is not.
- Cycle the list marker with Option-Command-L when automatic list formatting is on. Lock Note to Preview no longer uses that shortcut.
- Indent or outdent a list item or blockquote with Tab and Shift-Tab, and indent lines with Control-Command-Left and Control-Command-Right.
- Continue a blockquote or code fence when you press Return, and leave the quote when the line is empty.
- Renumber a numbered list as you edit it, when automatic list formatting is on.
- Move a paragraph or list item with Control-Command-Up and Control-Command-Down.
- Expand or shrink the selection by Markdown structure with Option-Command-Up and Option-Command-Down.
- Insert or jump to a reference link with F6, and a footnote with F7.
- Highlight invisible characters and unusual spaces in a note.
- Color nested list markers while Markdown highlighting is on.
- Indent using the tab width from settings.
- Open Keyboard Shortcuts in its own window.
- The default note font is SF Pro at 16 pt. A font you already chose stays as it is.
- Set the note list font from Fonts & Colors. It starts as SF Pro at 14 pt.
- Leave more room above the first line of a note.
- Submit a Simplenote login code once, when you press Return.
- Say when a login code has expired so you can email yourself a new one.
- Open the notes folder picker when the saved folder is gone.
- Keep alternating rows lined up with the grid.
- Keep the selected note readable on a light list in Dark Mode when the editor has focus.