Skip to main content

Module keymap

Module keymap 

Source
Expand description

The keymap table (0008 §3 — keymaps as data). v1: this table drives the Space ? keybinds popup and the which-key prefix cards; the trie dispatch cutover (0008 §5) makes it the dispatch source later.

Coverage contract (0003 §5.7): every dispatchable binding renders in the popup; the tests below pin both directions. live: false rows are planned slots — reserved keys with no dispatch yet (0003 §6) — and render muted with a “(soon)” suffix, never as live bindings.

§Notation

keys is space-separated tokens, one key per token (esc, :w, "+y; <a>/<c> parameterize a char):

  • space is the leader: its sequence runs to the row’s end.
  • ctrl-w takes exactly one following key.
  • / separates alternatives that replace the last key of the sequence before them (space d / kspace d, space k); alternatives run to the row’s end.
  • Every other token is one single-key sequence; a row may list several (h j k l), and a leading bare / is the search-forward key (/ ?).

Structs§

Binding
One binding as it appears in Space ? / which-key AND in dispatch (0008 stage 2: one table). id is the stable command identity — macros, dot-repeat, a future palette, and config rebinds ride it.
Hint
One which-key hint row: the next key after a pending prefix.

Enums§

AbsorbKind
The one-char absorber flavors.
Handler
How a sequence dispatches (0008 stage 2). The walker consults these; ?/which-key read the same row — the table is the single source.

Constants§

BINDINGS
SECTIONS

Functions§

any_child
Whether a live sequence strictly extends this path.
children_of
Mode-appropriate hints, including planned rows. Shortest sequences win; table order and then alternative order break ties.
compat_report
The vim-compatibility report, generated from the single binding table.
find_row
The first live table row completed by this path, including placeholders.