Writing

The three kinds of note, a snippet’s fields to fill, the code editor and Prettier, formatted notes, checklists and attachments.

Checked on DevNotes 0.12

Three kinds of note

The + New note button offers all three. Each also has its shortcut, active on the canvas:

Creating a note
KindForShortcut
Code snippeta block of code, its language and its fields to fillCtrlN
Noteformatted text: headings, lists, links, tables, code blocksCtrlShiftN
Todo liststeps to tick off, in orderCtrlShiftL

A note has a title, a source (the Context… it comes from: a tool, a doc, a project) and tags. It is written to disk only once it holds something: a note opened then closed empty leaves nothing behind. Esc closes the editor, saving.

The kind offered by default is chosen in Preferences… → General → Default note type.

Snippets

A snippet is highlighted by its language: twenty-six to choose from, from JSON, TypeScript, Python, Rust, Go or SQL to Shell, PowerShell, YAML, TOML or Elixir, plus plain text. The language menu filters from the keyboard: type the first letters, then Enter.

The code editor numbers its lines, keeps Tab in the text to indent, and finds or replaces with CtrlF. Line wrapping is set in the preferences.

Formatting with Prettier

The Format button (ShiftAltF) runs the snippet through Prettier. A banner says how many lines changed, and Undo goes back.

  • Formatted: JavaScript, TypeScript, JSON, CSS, SCSS, HTML, Markdown, YAML, GraphQL.
  • Not by Prettier: SQL, Python, Rust, Go, Java, C#, PHP, C, Shell, TOML, XML. The button is disabled there and says why.

Line width, indentation, quotes, semicolons and trailing commas are set once for the whole library, like formatting on save. A {{host}} field goes through formatting intact; if Prettier were to damage one, the text is left untouched.

Reading JSON as a graph

A JSON, YAML, TOML or XML snippet also opens as a Graph or a Tree. Side by side keeps the code on one side and the graph on the other: selecting a node highlights its lines. In the graph, the arrows move from node to node, Enter opens or closes an entry, and Shift→ expands everything.

Fields to fill

Write a name between double braces in a snippet, and its value will be asked for when you copy it. A name is made of letters, digits, hyphens and underscores. A suggested value is written after an equals sign:

A snippet with three fieldsSH
ssh -p {{port=22}} {{user}}@{{host}}

Copy it from its card (the button, or C on the focused card): DevNotes asks you to Fill the fields, shows a preview of what goes to the clipboard, then offers Copy filled or Copy as is. A field left empty keeps the value the text suggests.

What you type stays with the note, for next time. For a value valid everywhere, add a variable in Preferences… → Variables: it is offered to every snippet with a field of that name, and what is typed on a note comes first.

The quick paste palette asks the same questions: a snippet with fields can be pasted from any application. See Quick paste.

Formatted notes

A note is written formatted, and saved as Markdown. The toolbar and the shortcuts cover the essentials; a pasted code block keeps its language.

Formatting a note
KeysAction
CtrlAlt1Heading 1 (likewise 2 and 3)
CtrlBBold
CtrlIItalic
CtrlShiftSStrikethrough
CtrlEInline code
CtrlAltCCode block
CtrlShift8Bulleted list
CtrlShift7Numbered list
CtrlShift9Task list
CtrlShiftBQuote
CtrlKLink (Ctrl + click opens it)

A table is inserted from the toolbar, then grows row by row or column by column.

Todo lists

A list is ticked from its card, without opening it, and the card shows its progress. In the editor, Enter adds an item below this one, Backspace removes an empty item and Alt↑ or Alt↓ moves it.

Attachments

While a note is open, drop a file on the window, use + File, or paste an image with CtrlV: it is encrypted and attached to the note. A file can weigh up to 10 MB. The card shows how many; a preview grows on click, and each attachment opens or is saved elsewhere.

Pinning, prioritising, dating

  • Pinning (P on a card) puts a note at the top of its group.
  • Priority goes from 0 (none) to 4 (urgent): type the digit on a card.
  • A due date, set from the editor’s date field, makes a note one to sort: the Untriaged filter finds them before they are forgotten.

Copying, duplicating, deleting

  1. A card’s copy button puts the note on the clipboard without opening it.
  2. A card’s ⋯ menu duplicates it, moves it to another space or files it in a folder.
  3. Delete on a card moves it to the trash in two steps: once to arm, a second time to confirm. CtrlZ undoes it afterwards.