3Helix currently supports one-way key remapping through a simple TOML configuration
4file. (More powerful solutions such as rebinding via commands will be
5available in the future).
7To remap keys, create a `config.toml` file in your `helix` configuration
8directory (default `~/.config/helix` on Linux systems) with a structure like
12# At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
14C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
15C-o = ":open ~/.config/helix/config.toml" # Maps Ctrl-o to opening of the helix config file
16a = "move_char_left" # Maps the 'a' key to the move_char_left command
17w = "move_line_up" # Maps the 'w' key move_line_up
18"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
19g = { a = "code_action" } # Maps `ga` to show possible code actions
20"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
23"A-x" = "normal_mode" # Maps Alt-X to enter normal mode
24j = { k = "normal_mode" } # Maps `jk` to exit insert mode
29Minor modes are accessed by pressing a key (usually from normal mode), giving access to dedicated bindings. Bindings
30can be modified or added by nesting definitions.
34k = "normal_mode" # Maps `jk` to exit insert mode
37a = "code_action" # Maps `ga` to show possible code actions
39# invert `j` and `k` in view mode
44# create a new minor mode bound to `+`
46m = ":run-shell-command make"
47c = ":run-shell-command cargo build"
48t = ":run-shell-command cargo test"
51## Special keys and modifiers
53Ctrl, Shift and Alt modifiers are encoded respectively with the prefixes
54`C-`, `S-` and `A-`. Special keys are encoded as follows:
56| Key name | Representation |
58| Backspace | `"backspace"` |
60| Return/Enter | `"ret"` |
68| Page Up | `"pageup"` |
69| Page Down | `"pagedown"` |
76Keys can be disabled by binding them to the `no_op` command.
78A list of commands is available in the [Keymap](https://docs.helix-editor.com/keymap.html) documentation
79 and in the source code at [`helix-term/src/commands.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs) at the invocation of `static_commands!` macro and the `TypableCommandList`.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list