Mode properties
Development reference · View source
The Runyte preset declares Normal, Select, Insert and Replace using the same
properties as other named modes. :help modes shows this schema in the editor.
Space h m (:describe-mode) shows the active mode’s effective values,
inheritance chain and the source of each value. Space h k identifies the mode
that supplies an inspected binding.
| Property | Values | Default | Meaning |
|---|---|---|---|
inherits | A declared mode name, or null | none | Parent binding table searched after this mode’s own bindings. |
unbound-keys | pass-to-buffer, overwrite, report; null resets to the default | report | Behavior after the whole binding chain has no match. This property is not inherited. |
motions | move, select, extend; null inherits | inherited value, or move | Move carets, select crossed spans for supported motions, or extend every motion. A step’s extend flag overrides this property. |
selection-extent | characterwise, linewise; null inherits | inherited value, or characterwise | Linewise modes operate on whole rows while retaining reversible motion endpoints. Independent of motions and per-step extend. |
after-each | A program; null disables inheritance | inherited value, or none | Runs once after each successful complete binding started and ended in this mode, sharing its prefixes and undo group. Hook steps never trigger hooks. |
display-name | 1–64 UTF-8 bytes without control characters; null resets to the mode name | the mode name | Label shown in the status line. This property is not inherited. |
The preset uses motions: select for Normal, extend for Select, and move
for Insert and Replace. select starts a fresh crossed selection for word
and character-find motions (w b e W B E f t F T); other motions move carets.
extend retains the anchor for every motion. A program step’s extend: true
or extend: false takes priority for that step.
selection-extent: linewise makes the selected rows operative while preserving
raw anchor and caret positions: extending down and then up reverses naturally.
It is independent of motions and per-step extend. Children inherit the
property unless they explicitly choose characterwise, which resumes the
ordinary action-defined extent; it does not discard an existing explicit line
selection. The Runyte preset
keeps the characterwise default and its existing explicit line-selection keys.
In 0.5, the live editor.selecting_motions setting remains a shorthand for
preset modes declared with motions: select, including Normal and specialized
Normal text buffer types such as Help and Git pages. True means select, false means
move; terminal input and review are unaffected. User-defined modes and explicit
motions properties are never overwritten. Children inherit their parent’s
resulting value unless they declare their own.
An explicit property takes priority. If an explicitly authored shorthand (configuration file or saved live setting) disagrees with explicit properties, one non-fatal diagnostic names both. The default shorthand never conflicts, so an exported keymap reloads without that diagnostic.
modes:
normal:
motions: move
display-name: NAV
select:
motions: extend
display-name: SELECT