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
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.
| View | Label | What it does |
|---|---|---|
| Read | READ | Renders the note without markdown syntax |
| Edit | EDIT | Reveals 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:
| Mapping | Description |
|---|---|
j / ↓ | Move cursor down |
k / ↑ | Move cursor up |
Ctrl+D | Scroll down half a page |
Ctrl+U | Scroll up half a page |
Ctrl+Shift+↓ | Jump to bottom of note |
Ctrl+Shift+↑ | Jump to top of note |
i | Switch to edit view |
Ctrl+E | Toggle to edit view |
Ctrl+X | Save 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+Xtypes anxrather than saving. Leave edit view withEscorCtrl+Ebefore saving.
| Mapping | Description |
|---|---|
Backspace | Delete one character before cursor |
Enter | Insert newline |
→ / ← | Move cursor forward / backward |
↑ / ↓ | Move cursor up / down |
Alt+f | Move cursor forward by word |
Alt+b | Move cursor backward by word |
Ctrl+E | Return to read view |
Esc | Return 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.
ifromNORMALentersINSERT, where the hardcoded mappings above applyEscfromINSERTreturns toNORMAL, where the configurable[note_editor]bindings apply againEscfromNORMALreturns toREAD
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.
Link completion#
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.
- Type
#after a note name to list the headings of that note, for example[[Themes#. - Type
[[#to list the headings of the current note.
| Mapping | Description |
|---|---|
↑ / ↓, Ctrl+P / Ctrl+N | Move the selection |
Enter, Tab | Insert the selected link with its ]] |
Esc | Close 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.
- Pasting images from the clipboard is not supported
See Known Limitations for the full list.