⋅𝕭𝖆𝖘𝖆𝖑𝖙⋅
USER INTERFACE

Editor (experimental)

[!WARNING]

The editor is experimental and subject to change. It is built from scratch with limited capabilities. More features will be added incrementally.

Basalt opens notes read-only by default. Enable the built-in editor in your Configuration file:

[note_editor]
experimental = true
note-editor demo

Views#

Basalt follows Obsidian's view model with a read view and an edit view. The current view is shown as a label in the corner of the Note editor pane.

ViewLabelWhat it does
ReadREADRenders the note without markdown syntax
EditEDITReveals raw markdown on the line under the cursor and accepts typing

Only the line under the cursor shows its raw markdown. Every other line stays rendered while you type.

Read view#

Read view uses the [note_editor] key bindings, so it is fully configurable. These are the defaults:

MappingDescription
j / ↓Move cursor down
k / ↑Move cursor up
Ctrl+DScroll down half a page
Ctrl+UScroll up half a page
Ctrl+Shift+↓Jump to bottom of note
Ctrl+Shift+↑Jump to top of note
iSwitch to edit view
Ctrl+EToggle to edit view
Ctrl+XSave the note

Edit view#

[!WARNING]

Edit view key mappings are hardcoded and cannot be configured. Every key not in the table below is inserted as text, so Ctrl+X types an x rather than saving. Leave edit view with Esc or Ctrl+E before saving.

MappingDescription
BackspaceDelete one character before cursor
EnterInsert newline
→ / ←Move cursor forward / backward
↑ / ↓Move cursor up / down
Alt+fMove cursor forward by word
Alt+bMove cursor backward by word
Ctrl+EReturn to read view
EscReturn to read view

Vim mode#

Set vim_mode = true in [note_editor]. The edit view then gains Normal and Insert sub-modes, and the mode label shows NORMAL, INSERT, VISUAL or V-LINE.

NORMAL is a configurable mode, so Ctrl+X saves there. It also carries the full vim preset: motions, operators, registers, undo and redo. See Configuration for the complete list.

When you type [[ in edit view, a dropdown lists the notes in the vault. Type more of the name to filter the list. The filter is fuzzy, so the characters must appear in order but do not need to be next to each other. In vim mode, the dropdown opens in Insert mode only.

MappingDescription
↑ / ↓, Ctrl+P / Ctrl+NMove the selection
Enter, TabInsert the selected link with its ]]
EscClose the dropdown

Saving#

Ctrl+X saves the note to disk and shows a confirmation toast. It works from read view and from Normal mode in vim mode, but not while typing in edit view.

To save without Ctrl+X, set autosave = true in [note_editor] (see Configuration). Autosave writes only modified notes, includes text still being typed, and shows no toast. The tab title's modified marker clears once the note is written.

Limitations#

The edit view edits the whole note line by line. With vim mode it also supports motions, operators (delete, change, yank, paste), visual (line and block) selection, undo/redo and jumps to the start and end of the line and document.

See Known Limitations for the full list.