on master help sign in
book: Refer to keys by key names, not representations
425df93Tim Siegel
book/src/keymap.md+6−6
@@ -129,7 +129,7 @@
129| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` |
129| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` |
130| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
130| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
131| `J` | Join lines inside selection | `join_selections` |
131| `J` | Join lines inside selection | `join_selections` |
132−| `A-J` | Join lines inside selection and select space | `join_selections_space` |
132+| `Alt-J` | Join lines inside selection and select space | `join_selections_space` |
133| `K` | Keep selections matching the regex | `keep_selections` |
133| `K` | Keep selections matching the regex | `keep_selections` |
134| `Alt-K` | Remove selections matching the regex | `remove_selections` |
134| `Alt-K` | Remove selections matching the regex | `remove_selections` |
135| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
135| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
@@ -278,7 +278,7 @@ This layer is a kludge of mappings, mostly pickers.
278| `/` | Global search in workspace folder | `global_search` |
278| `/` | Global search in workspace folder | `global_search` |
279| `?` | Open command palette | `command_palette` |
279| `?` | Open command palette | `command_palette` |
280
280
281−> TIP: Global search displays results in a fuzzy picker, use `space + '` to bring it back up after opening a file.
281+> TIP: Global search displays results in a fuzzy picker, use `Space + '` to bring it back up after opening a file.
282
282
283##### Popup
283##### Popup
284
284
@@ -311,8 +311,8 @@ Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaire
311| `]t` | Go to previous test (**TS**) | `goto_prev_test` |
311| `]t` | Go to previous test (**TS**) | `goto_prev_test` |
312| `]p` | Go to next paragraph | `goto_next_paragraph` |
312| `]p` | Go to next paragraph | `goto_next_paragraph` |
313| `[p` | Go to previous paragraph | `goto_prev_paragraph` |
313| `[p` | Go to previous paragraph | `goto_prev_paragraph` |
314−| `[space` | Add newline above | `add_newline_above` |
314+| `[Space` | Add newline above | `add_newline_above` |
315−| `]space` | Add newline below | `add_newline_below` |
315+| `]Space` | Add newline below | `add_newline_below` |
316
316
317## Insert mode
317## Insert mode
318
318
@@ -414,8 +414,8 @@ Keys to use within prompt, Remapping currently not supported.
414| `Alt-d`, `Alt-Delete`, `Ctrl-Delete` | Delete next word |
414| `Alt-d`, `Alt-Delete`, `Ctrl-Delete` | Delete next word |
415| `Ctrl-u` | Delete to start of line |
415| `Ctrl-u` | Delete to start of line |
416| `Ctrl-k` | Delete to end of line |
416| `Ctrl-k` | Delete to end of line |
417−| `backspace`, `Ctrl-h` | Delete previous char |
417+| `Backspace`, `Ctrl-h` | Delete previous char |
418−| `delete`, `Ctrl-d` | Delete next char |
418+| `Delete`, `Ctrl-d` | Delete next char |
419| `Ctrl-s` | Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
419| `Ctrl-s` | Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
420| `Ctrl-p`, `Up` | Select previous history |
420| `Ctrl-p`, `Up` | Select previous history |
421| `Ctrl-n`, `Down` | Select next history |
421| `Ctrl-n`, `Down` | Select next history |
book/src/remapping.md+4−4
@@ -11,11 +11,11 @@ this:
11```toml
11```toml
12# At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
12# At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
13[keys.normal]
13[keys.normal]
14−C-s = ":w" # Maps the Control-s to the typable command :w which is an alias for :write (save file)
14+C-s = ":w" # Maps the Ctrl-s to the typable command :w which is an alias for :write (save file)
15−C-o = ":open ~/.config/helix/config.toml" # Maps the Control-o to opening of the helix config file
15+C-o = ":open ~/.config/helix/config.toml" # Maps the Ctrl-o to opening of the helix config file
16a = "move_char_left" # Maps the 'a' key to the move_char_left command
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
17w = "move_line_up" # Maps the 'w' key move_line_up
18−"C-S-esc" = "extend_line" # Maps Control-Shift-Escape to extend_line
18+"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
19g = { a = "code_action" } # Maps `ga` to show possible code actions
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
20"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
21
21
@@ -25,7 +25,7 @@ j = { k = "normal_mode" } # Maps `jk` to exit insert mode
25```
25```
26> NOTE: Typable commands can also be remapped, remember to keep the `:` prefix to indicate it's a typable command.
26> NOTE: Typable commands can also be remapped, remember to keep the `:` prefix to indicate it's a typable command.
27
27
28−Control, Shift and Alt modifiers are encoded respectively with the prefixes
28+Ctrl, Shift and Alt modifiers are encoded respectively with the prefixes
29`C-`, `S-` and `A-`. Special keys are encoded as follows:
29`C-`, `S-` and `A-`. Special keys are encoded as follows:
30
30
31| Key name | Representation |
31| Key name | Representation |
book/src/themes.md+2−2
@@ -244,7 +244,7 @@ These scopes are used for theming the editor interface.
244| `ui.statusline.insert` | Statusline mode during insert mode ([only if `editor.color-modes` is enabled][editor-section]) |
244| `ui.statusline.insert` | Statusline mode during insert mode ([only if `editor.color-modes` is enabled][editor-section]) |
245| `ui.statusline.select` | Statusline mode during select mode ([only if `editor.color-modes` is enabled][editor-section]) |
245| `ui.statusline.select` | Statusline mode during select mode ([only if `editor.color-modes` is enabled][editor-section]) |
246| `ui.statusline.separator` | Separator character in statusline |
246| `ui.statusline.separator` | Separator character in statusline |
247−| `ui.popup` | Documentation popups (e.g space-k) |
247+| `ui.popup` | Documentation popups (e.g Space + k) |
248| `ui.popup.info` | Prompt for multiple key options |
248| `ui.popup.info` | Prompt for multiple key options |
249| `ui.window` | Border lines separating splits |
249| `ui.window` | Border lines separating splits |
250| `ui.help` | Description box for commands |
250| `ui.help` | Description box for commands |
@@ -252,7 +252,7 @@ These scopes are used for theming the editor interface.
252| `ui.text.focus` | |
252| `ui.text.focus` | |
253| `ui.text.info` | The key: command text in `ui.popup.info` boxes |
253| `ui.text.info` | The key: command text in `ui.popup.info` boxes |
254| `ui.virtual.ruler` | Ruler columns (see the [`editor.rulers` config][editor-section]) |
254| `ui.virtual.ruler` | Ruler columns (see the [`editor.rulers` config][editor-section]) |
255−| `ui.virtual.whitespace` | Visible white-space characters |
255+| `ui.virtual.whitespace` | Visible whitespace characters |
256| `ui.virtual.indent-guide` | Vertical indent width guides |
256| `ui.virtual.indent-guide` | Vertical indent width guides |
257| `ui.menu` | Code and command completion menus |
257| `ui.menu` | Code and command completion menus |
258| `ui.menu.selected` | Selected autocomplete item |
258| `ui.menu.selected` | Selected autocomplete item |
book/src/usage.md+6−6
@@ -53,7 +53,7 @@ Multiple characters are currently not supported, but planned.
53
53
54## Syntax-tree Motions
54## Syntax-tree Motions
55
55
56−`A-p`, `A-o`, `A-i`, and `A-n` (or `Alt` and arrow keys) move the primary
56+`Alt-p`, `Alt-o`, `Alt-i`, and `Alt-n` (or `Alt` and arrow keys) move the primary
57selection according to the selection's place in the syntax tree. Let's walk
57selection according to the selection's place in the syntax tree. Let's walk
58through an example to get familiar with them. Many languages have a syntax like
58through an example to get familiar with them. Many languages have a syntax like
59so for function calls:
59so for function calls:
@@ -100,13 +100,13 @@ in the tree above.
100func([arg1], arg2, arg3)
100func([arg1], arg2, arg3)
101```
101```
102
102
103−Using `A-n` would select the next sibling in the syntax tree: `arg2`.
103+Using `Alt-n` would select the next sibling in the syntax tree: `arg2`.
104
104
105```
105```
106func(arg1, [arg2], arg3)
106func(arg1, [arg2], arg3)
107```
107```
108
108
109−While `A-o` would expand the selection to the parent node. In the tree above we
109+While `Alt-o` would expand the selection to the parent node. In the tree above we
110can see that we would select the `arguments` node.
110can see that we would select the `arguments` node.
111
111
112```
112```
@@ -114,10 +114,10 @@ func[(arg1, arg2, arg3)]
114```
114```
115
115
116There is also some nuanced behavior that prevents you from getting stuck on a
116There is also some nuanced behavior that prevents you from getting stuck on a
117−node with no sibling. If we have a selection on `arg1`, `A-p` would bring us
117+node with no sibling. If we have a selection on `arg1`, `Alt-p` would bring us
118to the previous child node. Since `arg1` doesn't have a sibling to its left,
118to the previous child node. Since `arg1` doesn't have a sibling to its left,
119−though, we climb the syntax tree and then take the previous selection. So `A-p`
119+though, we climb the syntax tree and then take the previous selection. So
120−will move the selection over to the "func" `identifier`.
120+`Alt-p` will move the selection over to the "func" `identifier`.
121
121
122```
122```
123[func](arg1, arg2, arg3)
123[func](arg1, arg2, arg3)