Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Keymap

Every key in Astrolabe CLI, in the reader, overlays, panels and editor, for printing or keeping in a second window.

The reader keys come from the keymap table in internal/tui/keymap.go. The in-app help (?) and the leader palette (press Space and wait) read the same table.

A count typed before a key repeats it or gives it a target: 5j moves five lines down, and 12G goes to source line 12. Esc always closes the topmost overlay.

Reader

The reader shows an accent-coloured ▎ cursor in the left margin. Actions apply to the block under it.

Move

KeysAction
j, ↓cursor down (counts work: 5j)
k, ↑cursor up
Ctrl-dhalf page down
Ctrl-uhalf page up
Ctrl-f, PgDnpage down
Ctrl-b, PgUppage up
gg, Hometop ({N}gg: source line N)
G, Endbottom ({N}G: source line N)
]], }next heading
[[, {previous heading
l, →scroll a code block right (4 columns)
h, ←scroll a code block left

The cursor skips blank spacing lines.

KeysAction
Tabnext link (highlights it)
Shift-Tabprevious link
Enter, gd, Ctrl-]follow the highlighted link, or the first link on the cursor line
Backspace, Ctrl-o, Hback in history
Lforward in history

What Enter does depends on what is under the cursor:

  • A note link opens the note, and a link to a heading or block jumps there.
  • A broken link asks whether to create the note (y / n). A broken link to an attachment (![[chart.png]]) only says it is missing.
  • A URL is shown in the status bar and copied to the clipboard (OSC 52). Astrolabe CLI never opens it.
  • A heading with no link has its fold toggled.
  • A footnote mark jumps to the footnote’s definition.

Folds, tasks, editing

KeysAction
zafold or unfold the section under the cursor
zcfold the section
zounfold the section
zMfold every section
zRunfold everything
xtoggle the task under the cursor (rewrites one character in the file)
iedit this block in the built-in editor, in Insert mode at the start of the source line’s text (after any list, task, quote or heading marker)
aedit this block in the built-in editor, in Insert mode at the end of the source line
eedit this block in the built-in editor, in Normal mode on the source line
Eopen $VISUAL / $EDITOR at this line, then reload the note. With editor = external, i, a and e do this too

Task states toggle like this:

  • [ ] → [x]
  • [x] → [ ]
  • [/] (in progress) → [x]
  • [-] (cancelled) and any other custom state → [ ]
KeysAction
/search inside the note (incremental; Enter keeps it, Esc restores the view)
nnext match
Nprevious match
Ctrl-pfind a note

Space (leader)

KeysPalette wordAction
Space ffindfind a note (title, path, alias)
Space /, Space ssearchsearch the vault’s text
Space dtodaytoday’s daily note
Space ccapturecapture a line to today’s note
Space nnewnew note
Space tagendaopen tasks by due date
Space #tagstags, then notes with a tag
Space bbacklinksfocus backlinks in the context panel (again: close it)
Space ooutlinefocus the outline in the context panel (again: close it)
Space etreetoggle the file tree
Space rrecentrecent notes
Space Tthemecycle the theme (saved to the config file)
Space yyankcopy this note’s wikilink
Space qquitquit

If you press Space and wait 300 ms, a palette lists every Space binding.

Other

KeysAction
q, ZZquit (asks if there are unsaved edits)
?help
:command line
Escclear the highlighted link and search
Ctrl-lredraw the screen
Ctrl-zsuspend (fg to return)
Ctrl-cshows “type q to quit”; it does not quit

Reader commands

Type these after :. Tab and Shift-Tab complete command names, note names after :e, and theme names after :theme.

CommandAction
:e NOTE, :edit, :o, :openopen a note (name, path or unique fuzzy match)
:ereload the current note from disk
:new [TITLE], :enewcreate a note and open it in the editor (asks for a title if none is given)
:today, :dailytoday’s daily note
:theme [NAME], :colo NAMEswitch theme and save it; with no name, show the current one
:export [FILE]write the note as HTML; the default is <name>.html in the current directory, never inside the vault
:set wrap=N (measure, tw, textwidth)page width in columns, 20 or more
:set nu, :set nonu, :set nu!line numbers in the editor
:setshow the width and theme
:Ngo to source line N
:tagstags overlay
:agenda, :tasksagenda overlay
:nohclear the search highlight
:help, :hhelp overlay
:q, :quit, :wq, :x, :qaquit
:wdoes nothing in the reader, which never changes the file; use i to edit

Overlays and panels

Finder (Ctrl-p, Space f, Space r) and vault search (Space /)

KeysAction
typingfilter (the finder) or search (vault search; runs as you type)
↓, Ctrl-n, Ctrl-jnext result
↑, Ctrl-p, Ctrl-kprevious result
PgDn, Ctrl-d, Ctrl-fpage down
PgUp, Ctrl-u, Ctrl-bpage up
Enteropen the selected note (vault search jumps to the line)
Ctrl-w, Alt-Backspacedelete a word
Ctrl-a, Ctrl-e, ←, →move in the input
Escclose

With an empty query the finder lists recent notes. The note you are reading is listed last, so Ctrl-p Enter returns to the previous note.

Agenda (Space t)

KeysAction
j k, ↓ ↑move
g, Gfirst / last
x, Spacetoggle the task
Enter, lopen the note at the task
q, Escclose

Below 70 columns the agenda drops its note column so the task text gets the whole row; the selected task’s note is named in the header instead.

Tags (Space #)

KeysAction
typingfilter tags
↓ ↑move
Enterlist the notes with that tag

In the list of notes: Enter or l opens the selected note, Backspace or h goes back to the tags, and j/k move.

Capture (Space c) and new note (Space n)

KeysAction
typingthe text
Tab(capture) switch between a note line and a task; typing [ ] first also makes a task
Entersave
Esccancel

Prompts

PromptKeys
Create a note for a broken linky or Enter yes · n or q no
File changed on disk while editingr reload theirs · o overwrite with mine · c cancel

Context panel (Space o, Space b) and file tree (Space e)

KeysAction
j k, ↓ ↑move
g, Gfirst / last
Enter, ljump to the heading, open the backlink or note, or open a folder (tree)
h, ←close a folder (tree)
Ctrl-d, Ctrl-uhalf page (tree)
Esc, Tabreturn focus to the page

At 124 columns or wider, the context panel (outline above backlinks) opens by default.

Help (?)

j k scroll, Ctrl-d Ctrl-u scroll by half a page, g G go to the top and bottom, and q, ? or Esc close it.

Home screen

j k move over the recent notes, and Enter opens one. All the reader’s Space keys and Ctrl-p work here.

Mouse

WhereAction
readerthe wheel scrolls 3 lines. A click places the cursor, follows a link, or toggles a fold chevron
editora click places the cursor; the wheel scrolls
overlaysthe wheel scrolls; clicks are ignored

mouse = off in the config hands the mouse back to the terminal.

Editor

The editor implements a subset of Vim. The status bar shows NORMAL, INSERT, VISUAL or V-LINE. Lines that soft-wrap move by display line with j/k. A count, or an operator, makes them move by source line.

Modes and leaving

KeysAction
i a I AInsert before / after the cursor, at the line’s first non-blank / end
o Oopen a line below / above (on a list item, continues the list)
gIInsert at column 0
v, VVisual, Visual-line
gvreselect the last Visual area
EscInsert/Visual → Normal. In Normal with nothing pending: save if changed, back to the reader
:w, Ctrl-ssave
:qleave (refuses with unsaved changes, as Vim does)
:q!, ZQleave, discarding changes
:wq, :x, ZZsave if changed and leave

In a astrolabe new -o session, leaving the editor exits Astrolabe CLI. Everywhere else it returns to the reader. Other ex commands (:e NOTE, :theme NAME, :today, :new, :export) are passed to the reader.

Motions

KeysMotion
h j k l, arrows, Backspace, Spacecharacter / line
w b e ge, W B E gEwords, WORDS
0 ^ $ g_ {N}|line start, first non-blank, end, last non-blank, column N
gg G {N}G {N}%first / last / Nth line, N percent
{ }paragraph back / forward
%matching bracket
f F t T ; ,find a character on the line, repeat, repeat backwards
H M Ltop / middle / bottom of the window
+ - Enternext / previous line, first non-blank
Ctrl-d Ctrl-u Ctrl-f Ctrl-bhalf / full page
Ctrl-e Ctrl-yscroll one line
zz zt zbcursor line to the middle / top / bottom

Operators and text objects

KeysAction
d c ydelete, change, yank
> <indent, outdent
g~ gu gUtoggle case, lower, upper
iw aw iW aWword, WORD
ip apparagraph
i" a" i' a' i` a`quoted text
i( a( ib · i[ a[ · i{ a{ iB · i< a<brackets (a count selects enclosing levels)

Changes

KeysAction
dd cc yy >> <<the whole line
D C Yto the end of the line (Y as in Neovim)
x Xdelete a character after / before
s Ssubstitute a character / line
r{c}replace a character
J gJjoin lines with / without a space
~toggle case
p Pput after / before
u Ctrl-rundo, redo (an insert session is one step)
.repeat the last change (with a new count if given)
&repeat the last :s

Registers

The editor supports the unnamed register, "0 (last yank), "a–"z (capitals append), "_ (black hole), and "+ / "*, which copy to the system clipboard through the terminal (OSC 52). Text pasted from the terminal arrives as a bracketed paste.

Search and substitute

KeysAction
/pat ?patsearch forward / backward (incremental, smart-case, Vim “magic” syntax)
n Nnext / previous match
* #the word under the cursor, forward / backward
:s/a/b/[flags]substitute on the current line
:%s/a/b/gsubstitute on every line
:N,Ms/…, :'<,'>s/…ranges: N, ., $, %, '<,'>, ±N

The flags are g, i, I and &. In the replacement, &, \0–\9, \r, \n and \t work. Other ex commands: :N, :d, :y, :j, :>, :<, :u, :red, :noh. :set accepts nu, nonu, nu!, wrap=N, hls, ic and scs.

Markdown help in Insert mode

KeysAction
Entercontinue a bullet, numbered item (renumbering the rest), task (new [ ]), quote or callout. On an empty item it ends the list, or outdents a nested item
Tab / Shift-Tab on a list itemindent / outdent it (ordered lists renumber)
Tab / Shift-Tab in a tablenext / previous cell, re-aligning the whole table. Tab in the last cell adds a row
Tab elsewherespaces to the next multiple of 4, or a tab in files indented with tabs
[[note completer: ↓ ↑ or Ctrl-n Ctrl-p move, Enter or Tab insert, Esc keeps the typed text
Ctrl-tinsert YYYY-MM-DD HH:MM

Not in the editor

These Vim features are missing:

  • numbered registers "1–"9 and "-
  • Ctrl-r {reg} in Insert mode, and gi
  • sentence objects is / as
  • macros and marks
  • :set nowrap: the editor always soft-wraps
  • splits
  • back-references inside a search pattern (\1); they do work in :s replacements
  • the c (confirm) flag of :s