on master help sign in
Add `Command` column to keymap documentation (#662)
048a390Omnikar
book/src/keymap.md+146−146
@@ -6,121 +6,121 @@
6
6
7> NOTE: `f`, `F`, `t` and `T` are not confined to the current line.
7> NOTE: `f`, `F`, `t` and `T` are not confined to the current line.
8
8
9−| Key | Description |
9+| Key | Description | Command |
10−| ----- | ----------- |
10+| ----- | ----------- | ------- |
11−| `h`, `Left` | Move left |
11+| `h`, `Left` | Move left | `move_char_left` |
12−| `j`, `Down` | Move down |
12+| `j`, `Down` | Move down | `move_char_right` |
13−| `k`, `Up` | Move up |
13+| `k`, `Up` | Move up | `move_line_up` |
14−| `l`, `Right` | Move right |
14+| `l`, `Right` | Move right | `move_line_down` |
15−| `w` | Move next word start |
15+| `w` | Move next word start | `move_next_word_start` |
16−| `b` | Move previous word start |
16+| `b` | Move previous word start | `move_prev_word_start` |
17−| `e` | Move next word end |
17+| `e` | Move next word end | `move_next_word_end` |
18−| `W` | Move next WORD start |
18+| `W` | Move next WORD start | `move_next_long_word_start` |
19−| `B` | Move previous WORD start |
19+| `B` | Move previous WORD start | `move_prev_long_word_start` |
20−| `E` | Move next WORD end |
20+| `E` | Move next WORD end | `move_next_long_word_end` |
21−| `t` | Find 'till next char |
21+| `t` | Find 'till next char | `find_till_char` |
22−| `f` | Find next char |
22+| `f` | Find next char | `find_next_char` |
23−| `T` | Find 'till previous char |
23+| `T` | Find 'till previous char | `till_prev_char` |
24−| `F` | Find previous char |
24+| `F` | Find previous char | `find_prev_char` |
25−| `Home` | Move to the start of the line |
25+| `Home` | Move to the start of the line | `goto_line_start` |
26−| `End` | Move to the end of the line |
26+| `End` | Move to the end of the line | `goto_line_end` |
27−| `PageUp` | Move page up |
27+| `PageUp` | Move page up | `page_up` |
28−| `PageDown` | Move page down |
28+| `PageDown` | Move page down | `page_down` |
29−| `Ctrl-u` | Move half page up |
29+| `Ctrl-u` | Move half page up | `half_page_up` |
30−| `Ctrl-d` | Move half page down |
30+| `Ctrl-d` | Move half page down | `half_page_down` |
31−| `Ctrl-i` | Jump forward on the jumplist TODO: conflicts tab |
31+| `Ctrl-i` | Jump forward on the jumplist TODO: conflicts tab | `jump_forward` |
32−| `Ctrl-o` | Jump backward on the jumplist |
32+| `Ctrl-o` | Jump backward on the jumplist | `jump_backward` |
33−| `v` | Enter [select (extend) mode](#select--extend-mode) |
33+| `v` | Enter [select (extend) mode](#select--extend-mode) | `select_mode` |
34−| `g` | Enter [goto mode](#goto-mode) |
34+| `g` | Enter [goto mode](#goto-mode) | N/A |
35−| `m` | Enter [match mode](#match-mode) |
35+| `m` | Enter [match mode](#match-mode) | N/A |
36−| `:` | Enter command mode |
36+| `:` | Enter command mode | `command_mode` |
37−| `z` | Enter [view mode](#view-mode) |
37+| `z` | Enter [view mode](#view-mode) | N/A |
38−| `Ctrl-w` | Enter [window mode](#window-mode) (maybe will be remove for spc w w later) |
38+| `Ctrl-w` | Enter [window mode](#window-mode) (maybe will be remove for spc w w later) | N/A |
39−| `Space` | Enter [space mode](#space-mode) |
39+| `Space` | Enter [space mode](#space-mode) | N/A |
40−| `K` | Show documentation for the item under the cursor |
40+| `K` | Show documentation for the item under the cursor | `hover` |
41
41
42### Changes
42### Changes
43
43
44−| Key | Description |
44+| Key | Description | Command |
45−| ----- | ----------- |
45+| ----- | ----------- | ------- |
46−| `r` | Replace with a character |
46+| `r` | Replace with a character | `replace` |
47−| `R` | Replace with yanked text |
47+| `R` | Replace with yanked text | `replace_with_yanked` |
48−| `~` | Switch case of the selected text |
48+| `~` | Switch case of the selected text | `switch_case` |
49−| `` ` `` | Set the selected text to lower case |
49+| `` ` `` | Set the selected text to lower case | `switch_to_lowercase` |
50−| `` Alt-` `` | Set the selected text to upper case |
50+| `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
51−| `i` | Insert before selection |
51+| `i` | Insert before selection | `insert_mode` |
52−| `a` | Insert after selection (append) |
52+| `a` | Insert after selection (append) | `append_mode` |
53−| `I` | Insert at the start of the line |
53+| `I` | Insert at the start of the line | `prepend_to_line` |
54−| `A` | Insert at the end of the line |
54+| `A` | Insert at the end of the line | `append_to_line` |
55−| `o` | Open new line below selection |
55+| `o` | Open new line below selection | `open_below` |
56−| `O` | Open new line above selection |
56+| `O` | Open new line above selection | `open_above` |
57−| `u` | Undo change |
57+| `u` | Undo change | `undo` |
58−| `U` | Redo change |
58+| `U` | Redo change | `redo` |
59−| `y` | Yank selection |
59+| `y` | Yank selection | `yank` |
60−| `p` | Paste after selection |
60+| `p` | Paste after selection | `paste_after` |
61−| `P` | Paste before selection |
61+| `P` | Paste before selection | `paste_before` |
62−| `"` `<reg>` | Select a register to yank to or paste from |
62+| `"` `<reg>` | Select a register to yank to or paste from | `select_register` |
63−| `>` | Indent selection |
63+| `>` | Indent selection | `indent` |
64−| `<` | Unindent selection |
64+| `<` | Unindent selection | `unindent` |
65−| `=` | Format selection |
65+| `=` | Format selection | `format_selections` |
66−| `d` | Delete selection |
66+| `d` | Delete selection | `delete_selection` |
67−| `c` | Change selection (delete and enter insert mode) |
67+| `c` | Change selection (delete and enter insert mode) | `change_selection` |
68
68
69### Selection manipulation
69### Selection manipulation
70
70
71−| Key | Description |
71+| Key | Description | Command |
72−| ----- | ----------- |
72+| ----- | ----------- | ------- |
73−| `s` | Select all regex matches inside selections |
73+| `s` | Select all regex matches inside selections | `select_regex` |
74−| `S` | Split selection into subselections on regex matches |
74+| `S` | Split selection into subselections on regex matches | `split_selection` |
75−| `Alt-s` | Split selection on newlines |
75+| `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
76−| `;` | Collapse selection onto a single cursor |
76+| `;` | Collapse selection onto a single cursor | `collapse_selection` |
77−| `Alt-;` | Flip selection cursor and anchor |
77+| `Alt-;` | Flip selection cursor and anchor | `flip_selections` |
78−| `C` | Copy selection onto the next line |
78+| `C` | Copy selection onto the next line | `copy_selection_on_next_line` |
79−| `Alt-C` | Copy selection onto the previous line |
79+| `Alt-C` | Copy selection onto the previous line | `copy_selection_on_prev_line` |
80−| `(` | Rotate main selection forward |
80+| `(` | Rotate main selection forward | `rotate_selections_backward` |
81−| `)` | Rotate main selection backward |
81+| `)` | Rotate main selection backward | `rotate_selections_forward` |
82−| `Alt-(` | Rotate selection contents forward |
82+| `Alt-(` | Rotate selection contents forward | `rotate_selection_contents_backward` |
83−| `Alt-)` | Rotate selection contents backward |
83+| `Alt-)` | Rotate selection contents backward | `rotate_selection_contents_forward` |
84−| `%` | Select entire file |
84+| `%` | Select entire file | `select_all` |
85−| `x` | Select current line, if already selected, extend to next line |
85+| `x` | Select current line, if already selected, extend to next line | `extend_line` |
86−| `X` | Extend selection to line bounds (line-wise selection) |
86+| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` |
87−| | Expand selection to parent syntax node TODO: pick a key |
87+| | Expand selection to parent syntax node TODO: pick a key | `expand_selection` |
88−| `J` | Join lines inside selection |
88+| `J` | Join lines inside selection | `join_selections` |
89−| `K` | Keep selections matching the regex TODO: overlapped by hover help |
89+| `K` | Keep selections matching the regex TODO: overlapped by hover help | `keep_selections` |
90−| `Space` | Keep only the primary selection TODO: overlapped by space mode |
90+| `Space` | Keep only the primary selection TODO: overlapped by space mode | `keep_primary_selection` |
91−| `Ctrl-c` | Comment/uncomment the selections |
91+| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
92
92
93### Insert Mode
93### Insert Mode
94
94
95−| Key | Description |
95+| Key | Description | Command |
96−| ----- | ----------- |
96+| ----- | ----------- | ------- |
97−| `Escape` | Switch to normal mode |
97+| `Escape` | Switch to normal mode | `normal_mode` |
98−| `Ctrl-x` | Autocomplete |
98+| `Ctrl-x` | Autocomplete | `completion` |
99−| `Ctrl-w` | Delete previous word |
99+| `Ctrl-w` | Delete previous word | `delete_word_backward` |
100
100
101### Search
101### Search
102
102
103> TODO: The search implementation isn't ideal yet -- we don't support searching
103> TODO: The search implementation isn't ideal yet -- we don't support searching
104in reverse, or searching via smartcase.
104in reverse, or searching via smartcase.
105
105
106−| Key | Description |
106+| Key | Description | Command |
107−| ----- | ----------- |
107+| ----- | ----------- | ------- |
108−| `/` | Search for regex pattern |
108+| `/` | Search for regex pattern | `search` |
109−| `n` | Select next search match |
109+| `n` | Select next search match | `search_next` |
110−| `N` | Add next search match to selection |
110+| `N` | Add next search match to selection | `extend_search_next` |
111−| `*` | Use current selection as the search pattern |
111+| `*` | Use current selection as the search pattern | `search_selection` |
112
112
113### Diagnostics
113### Diagnostics
114
114
115> NOTE: `[` and `]` will likely contain more pair mappings in the style of
115> NOTE: `[` and `]` will likely contain more pair mappings in the style of
116> [vim-unimpaired](https://github.com/tpope/vim-unimpaired)
116> [vim-unimpaired](https://github.com/tpope/vim-unimpaired)
117
117
118−| Key | Description |
118+| Key | Description | Command |
119−| ----- | ----------- |
119+| ----- | ----------- | ------- |
120−| `[d` | Go to previous diagnostic |
120+| `[d` | Go to previous diagnostic | `goto_prev_diag` |
121−| `]d` | Go to next diagnostic |
121+| `]d` | Go to next diagnostic | `goto_next_diag` |
122−| `[D` | Go to first diagnostic in document |
122+| `[D` | Go to first diagnostic in document | `goto_first_diag` |
123−| `]D` | Go to last diagnostic in document |
123+| `]D` | Go to last diagnostic in document | `goto_last_diag` |
124
124
125## Select / extend mode
125## Select / extend mode
126
126
@@ -135,14 +135,14 @@ commands to extend the existing selection instead of replacing it.
135View mode is intended for scrolling and manipulating the view without changing
135View mode is intended for scrolling and manipulating the view without changing
136the selection.
136the selection.
137
137
138−| Key | Description |
138+| Key | Description | Command |
139−| ----- | ----------- |
139+| ----- | ----------- | ------- |
140−| `z` , `c` | Vertically center the line |
140+| `z` , `c` | Vertically center the line | `align_view_center` |
141−| `t` | Align the line to the top of the screen |
141+| `t` | Align the line to the top of the screen | `align_view_top` |
142−| `b` | Align the line to the bottom of the screen |
142+| `b` | Align the line to the bottom of the screen | `align_view_bottom` |
143−| `m` | Align the line to the middle of the screen (horizontally) |
143+| `m` | Align the line to the middle of the screen (horizontally) | `align_view_middle` |
144−| `j` | Scroll the view downwards |
144+| `j` | Scroll the view downwards | `scroll_down` |
145−| `k` | Scroll the view upwards |
145+| `k` | Scroll the view upwards | `scroll_up` |
146
146
147## Goto mode
147## Goto mode
148
148
@@ -150,21 +150,21 @@ Jumps to various locations.
150
150
151> NOTE: Some of these features are only available with the LSP present.
151> NOTE: Some of these features are only available with the LSP present.
152
152
153−| Key | Description |
153+| Key | Description | Command |
154−| ----- | ----------- |
154+| ----- | ----------- | ------- |
155−| `g` | Go to the start of the file |
155+| `g` | Go to the start of the file | `goto_file_start` |
156−| `e` | Go to the end of the file |
156+| `e` | Go to the end of the file | `goto_last_line` |
157−| `h` | Go to the start of the line |
157+| `h` | Go to the start of the line | `goto_line_start` |
158−| `l` | Go to the end of the line |
158+| `l` | Go to the end of the line | `goto_line_end` |
159−| `s` | Go to first non-whitespace character of the line |
159+| `s` | Go to first non-whitespace character of the line | `goto_first_nonwhitespace` |
160−| `t` | Go to the top of the screen |
160+| `t` | Go to the top of the screen | `goto_window_top` |
161−| `m` | Go to the middle of the screen |
161+| `m` | Go to the middle of the screen | `goto_window_middle` |
162−| `b` | Go to the bottom of the screen |
162+| `b` | Go to the bottom of the screen | `goto_window_bottom` |
163−| `d` | Go to definition |
163+| `d` | Go to definition | `goto_definition` |
164−| `y` | Go to type definition |
164+| `y` | Go to type definition | `goto_type_definition` |
165−| `r` | Go to references |
165+| `r` | Go to references | `goto_reference` |
166−| `i` | Go to implementation |
166+| `i` | Go to implementation | `goto_implementation` |
167−| `a` | Go to the last accessed/alternate file |
167+| `a` | Go to the last accessed/alternate file | `goto_last_accessed_file` |
168
168
169## Match mode
169## Match mode
170
170
@@ -172,14 +172,14 @@ Enter this mode using `m` from normal mode. See the relavant section
172in [Usage](./usage.md) for an explanation about [surround](./usage.md#surround)
172in [Usage](./usage.md) for an explanation about [surround](./usage.md#surround)
173and [textobject](./usage.md#textobject) usage.
173and [textobject](./usage.md#textobject) usage.
174
174
175−| Key | Description |
175+| Key | Description | Command |
176−| ----- | ----------- |
176+| ----- | ----------- | ------- |
177−| `m` | Goto matching bracket |
177+| `m` | Goto matching bracket | `match_brackets` |
178−| `s` `<char>` | Surround current selection with `<char>` |
178+| `s` `<char>` | Surround current selection with `<char>` | `surround_add` |
179−| `r` `<from><to>` | Replace surround character `<from>` with `<to>` |
179+| `r` `<from><to>` | Replace surround character `<from>` with `<to>` | `surround_replace` |
180−| `d` `<char>` | Delete surround character `<char>` |
180+| `d` `<char>` | Delete surround character `<char>` | `surround_delete` |
181−| `a` `<object>` | Select around textobject |
181+| `a` `<object>` | Select around textobject | `select_textobject_around` |
182−| `i` `<object>` | Select inside textobject |
182+| `i` `<object>` | Select inside textobject | `select_textobject_inner` |
183
183
184## Object mode
184## Object mode
185
185
@@ -189,35 +189,35 @@ TODO: Mappings for selecting syntax nodes (a superset of `[`).
189
189
190This layer is similar to vim keybindings as kakoune does not support window.
190This layer is similar to vim keybindings as kakoune does not support window.
191
191
192−| Key | Description |
192+| Key | Description | Command |
193−| ----- | ------------- |
193+| ----- | ------------- | ------- |
194−| `w`, `Ctrl-w` | Switch to next window |
194+| `w`, `Ctrl-w` | Switch to next window | `rotate_view` |
195−| `v`, `Ctrl-v` | Vertical right split |
195+| `v`, `Ctrl-v` | Vertical right split | `vsplit` |
196−| `h`, `Ctrl-h` | Horizontal bottom split |
196+| `h`, `Ctrl-h` | Horizontal bottom split | `hsplit |
197−| `q`, `Ctrl-q` | Close current window |
197+| `q`, `Ctrl-q` | Close current window | `wclose` |
198
198
199## Space mode
199## Space mode
200
200
201This layer is a kludge of mappings I had under leader key in neovim.
201This layer is a kludge of mappings I had under leader key in neovim.
202
202
203−| Key | Description |
203+| Key | Description | Command |
204−| ----- | ----------- |
204+| ----- | ----------- | ------- |
205−| `f` | Open file picker |
205+| `f` | Open file picker | `file_picker` |
206−| `b` | Open buffer picker |
206+| `b` | Open buffer picker | `buffer_picker` |
207−| `s` | Open symbol picker (current document) |
207+| `s` | Open symbol picker (current document) | `symbol_picker` |
208−| `a` | Apply code action |
208+| `a` | Apply code action | `code_action` |
209−| `'` | Open last fuzzy picker |
209+| `'` | Open last fuzzy picker | `last_picker` |
210−| `w` | Enter [window mode](#window-mode) |
210+| `w` | Enter [window mode](#window-mode) | N/A |
211−| `space` | Keep primary selection TODO: it's here because space mode replaced it |
211+| `space` | Keep primary selection TODO: it's here because space mode replaced it | `keep_primary_selection` |
212−| `p` | Paste system clipboard after selections |
212+| `p` | Paste system clipboard after selections | `paste_clipboard_after` |
213−| `P` | Paste system clipboard before selections |
213+| `P` | Paste system clipboard before selections | `paste_clipboard_before` |
214−| `y` | Join and yank selections to clipboard |
214+| `y` | Join and yank selections to clipboard | `yank_joined_to_clipboard` |
215−| `Y` | Yank main selection to clipboard |
215+| `Y` | Yank main selection to clipboard | `yank_main_selection_to_clipboard` |
216−| `R` | Replace selections by clipboard contents |
216+| `R` | Replace selections by clipboard contents | `replace_selections_with_clipboard` |
217
217
218# Picker
218# Picker
219
219
220−Keys to use within picker.
220+Keys to use within picker. Remapping currently not supported.
221
221
222| Key | Description |
222| Key | Description |
223| ----- | ------------- |
223| ----- | ------------- |