Open-Source Wikis

/

Helix

/

Reference

/

Keymap

helix-editor/helix

Keymap

The default keymap is defined in code; the user-facing reference is auto-generated.

Sources of truth

Source Purpose
helix-term/src/keymap/default.rs The literal KeyTrie for normal/select/insert modes.
book/src/keymap.md The published reference at docs.helix-editor.com/keymap.html. Hand-written, kept in sync with the code.
book/src/generated/static-cmd.md Generated by cargo xtask docgen — every static command name, the function it binds to, and a one-line description.
book/src/generated/typable-cmd.md Generated typable command list.

Modes

Helix has three primary modes plus several sub-modes (sticky keys):

  • Normal — movement, count, selection commands.
  • Select — like Normal but every motion extends the selection.
  • Insert — text input.
  • Sub-modes (entered via sticky keys, exited on Esc): Goto (g), Match (m), Window (Ctrl-w), View (z/Z), Space (space), Bracket ([/]).

See features/modal-editing for the underlying implementation.

Customizing

User keymaps in ~/.config/helix/config.toml:

[keys.normal]
C-s = ":write"
"space.f" = ":format"

[keys.normal.space]
F = "file_picker_in_current_buffer_directory"

Lists of commands run in sequence:

[keys.normal]
"C-d" = ["select_mode", "page_cursor_half_down"]

Sticky modes — keys that keep their prefix active until Esc — are declared with the sticky = true field in the trie. User TOML can produce these via:

[keys.normal."C-w"]
sticky = true
"v" = ":vsplit"

Key syntax

Keys follow this grammar (parsed by helix-view/src/input.rs):

Form Meaning
a, Z, 1 Literal char.
space, tab, ret, esc, backspace, del, home, end, pageup, pagedown, up, down, left, right Named keys.
F1, …, F12 Function keys.
S-a Shift + a.
C-a, Ctrl-a Control + a.
A-a, Alt-a Alt + a.
S-C-a Combined modifiers.
< and > Need quoting.

Discovering bindings interactively

  • :config-reload after editing keys.
  • The auto-info popup shows valid follow-ups while you hold a sticky key (g, m, space).
  • :run-shell-command grep -n "<command>" path/to/keymap.md to find an unfamiliar binding.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Keymap – Helix wiki | Factory