Debian Codegraph @

book/src/keymap.md

raw symbols SCIP
1 ## Keymap
2
3 - [Normal mode](#normal-mode)
4 - [Movement](#movement)
5 - [Changes](#changes)
6 - [Shell](#shell)
7 - [Selection manipulation](#selection-manipulation)
8 - [Search](#search)
9 - [Minor modes](#minor-modes)
10 - [View mode](#view-mode)
11 - [Goto mode](#goto-mode)
12 - [Match mode](#match-mode)
13 - [Window mode](#window-mode)
14 - [Space mode](#space-mode)
15 - [Popup](#popup)
16 - [Completion Menu](#completion-menu)
17 - [Signature-help Popup](#signature-help-popup)
18 - [Unimpaired](#unimpaired)
19 - [Insert mode](#insert-mode)
20 - [Select / extend mode](#select--extend-mode)
21 - [Picker](#picker)
22 - [Prompt](#prompt)
23
24 > 💡 Mappings marked (**LSP**) require an active language server for the file.
25
26 > 💡 Mappings marked (**TS**) require a tree-sitter grammar for the file type.
27
28 > ⚠️ Some terminals' default key mappings conflict with Helix's. If any of the mappings described on this page do not work as expected, check your terminal's mappings to ensure they do not conflict. See the [wiki](https://github.com/helix-editor/helix/wiki/Terminal-Support) for known conflicts.
29
30 ## Normal mode
31
32 Normal mode is the default mode when you launch helix. You can return to it from other modes by pressing the `Escape` key.
33
34 ### Movement
35
36 > NOTE: Unlike Vim, `f`, `F`, `t` and `T` are not confined to the current line.
37
38 > Hereafter, `<n>` represents an integer by typing a sequence of digits.
39
40 | Key | Description | Command |
41 | ----- | ----------- | ------- |
42 | `h`, `Left` | Move left | `move_char_left` |
43 | `j`, `Down` | Move down | `move_visual_line_down` |
44 | `k`, `Up` | Move up | `move_visual_line_up` |
45 | `l`, `Right` | Move right | `move_char_right` |
46 | `w` | Move next word start | `move_next_word_start` |
47 | `b` | Move previous word start | `move_prev_word_start` |
48 | `e` | Move next word end | `move_next_word_end` |
49 | `W` | Move next WORD start | `move_next_long_word_start` |
50 | `B` | Move previous WORD start | `move_prev_long_word_start` |
51 | `E` | Move next WORD end | `move_next_long_word_end` |
52 | `t` | Find till next char | `find_till_char` |
53 | `f` | Find next char | `find_next_char` |
54 | `T` | Find till previous char | `till_prev_char` |
55 | `F` | Find previous char | `find_prev_char` |
56 | `<n>G`, `<n>gg` | Go to line number `<n>` | `goto_line` |
57 | `Alt-.` | Repeat last motion (`f`, `t`, `m`, `[` or `]`) | `repeat_last_motion` |
58 | `Home` | Move to the start of the line | `goto_line_start` |
59 | `End` | Move to the end of the line | `goto_line_end` |
60 | `Ctrl-b`, `PageUp` | Move page up | `page_up` |
61 | `Ctrl-f`, `PageDown` | Move page down | `page_down` |
62 | `Ctrl-u` | Move cursor and page half page up | `page_cursor_half_up` |
63 | `Ctrl-d` | Move cursor and page half page down | `page_cursor_half_down` |
64 | `Ctrl-i` | Jump forward on the jumplist | `jump_forward` |
65 | `Ctrl-o` | Jump backward on the jumplist | `jump_backward` |
66 | `Ctrl-s` | Save the current selection to the jumplist | `save_selection` |
67
68 ### Changes
69
70 | Key | Description | Command |
71 | ----- | ----------- | ------- |
72 | `r` | Replace with a character | `replace` |
73 | `R` | Replace with yanked text | `replace_with_yanked` |
74 | `~` | Switch case of the selected text | `switch_case` |
75 | `` ` `` | Set the selected text to lower case | `switch_to_lowercase` |
76 | `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
77 | `i` | Insert before selection | `insert_mode` |
78 | `a` | Insert after selection (append) | `append_mode` |
79 | `I` | Insert at the start of the line | `insert_at_line_start` |
80 | `A` | Insert at the end of the line | `insert_at_line_end` |
81 | `o` | Open new line below selection | `open_below` |
82 | `O` | Open new line above selection | `open_above` |
83 | `.` | Repeat last insert | N/A |
84 | `u` | Undo change | `undo` |
85 | `U` | Redo change | `redo` |
86 | `Alt-u` | Move backward in history | `earlier` |
87 | `Alt-U` | Move forward in history | `later` |
88 | `y` | Yank selection | `yank` |
89 | `p` | Paste after selection | `paste_after` |
90 | `P` | Paste before selection | `paste_before` |
91 | `"` `<reg>` | Select a register to yank to or paste from | `select_register` |
92 | `>` | Indent selection | `indent` |
93 | `<` | Unindent selection | `unindent` |
94 | `=` | Format selection (**LSP**) | `format_selections` |
95 | `d` | Delete selection | `delete_selection` |
96 | `Alt-d` | Delete selection, without yanking | `delete_selection_noyank` |
97 | `c` | Change selection (delete and enter insert mode) | `change_selection` |
98 | `Alt-c` | Change selection (delete and enter insert mode, without yanking) | `change_selection_noyank` |
99 | `Ctrl-a` | Increment object (number) under cursor | `increment` |
100 | `Ctrl-x` | Decrement object (number) under cursor | `decrement` |
101 | `Q` | Start/stop macro recording to the selected register (experimental) | `record_macro` |
102 | `q` | Play back a recorded macro from the selected register (experimental) | `replay_macro` |
103 | `Ctrl-z` | Suspend Helix and return to the shell (resume with `fg`) | `suspend` |
104
105 #### Shell
106
107 | Key | Description | Command |
108 | ------ | ----------- | ------- |
109 | <code>&#124;</code> | Pipe each selection through shell command, replacing with output | `shell_pipe` |
110 | <code>Alt-&#124;</code> | Pipe each selection into shell command, ignoring output | `shell_pipe_to` |
111 | `!` | Run shell command, inserting output before each selection | `shell_insert_output` |
112 | `Alt-!` | Run shell command, appending output after each selection | `shell_append_output` |
113 | `$` | Pipe each selection into shell command, keep selections where command returned 0 | `shell_keep_pipe` |
114
115
116 ### Selection manipulation
117
118 | Key | Description | Command |
119 | ----- | ----------- | ------- |
120 | `s` | Select all regex matches inside selections | `select_regex` |
121 | `S` | Split selection into sub selections on regex matches | `split_selection` |
122 | `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
123 | `Alt-minus` | Merge selections | `merge_selections` |
124 | `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` |
125 | `&` | Align selection in columns | `align_selections` |
126 | `_` | Trim whitespace from the selection | `trim_selections` |
127 | `;` | Collapse selection onto a single cursor | `collapse_selection` |
128 | `Alt-;` | Flip selection cursor and anchor | `flip_selections` |
129 | `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` |
130 | `,` | Keep only the primary selection | `keep_primary_selection` |
131 | `Alt-,` | Remove the primary selection | `remove_primary_selection` |
132 | `C` | Copy selection onto the next line (Add cursor below) | `copy_selection_on_next_line` |
133 | `Alt-C` | Copy selection onto the previous line (Add cursor above) | `copy_selection_on_prev_line` |
134 | `(` | Rotate main selection backward | `rotate_selections_backward` |
135 | `)` | Rotate main selection forward | `rotate_selections_forward` |
136 | `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` |
137 | `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` |
138 | `%` | Select entire file | `select_all` |
139 | `x` | Select current line, if already selected, extend to next line | `extend_line_below` |
140 | `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` |
141 | `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
142 | `J` | Join lines inside selection | `join_selections` |
143 | `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` |
144 | `K` | Keep selections matching the regex | `keep_selections` |
145 | `Alt-K` | Remove selections matching the regex | `remove_selections` |
146 | `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
147 | `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
148 | `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
149 | `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
150 | `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
151 | `Alt-a` | Select all sibling nodes in syntax tree (**TS**) | `select_all_siblings` |
152 | `Alt-I`, `Alt-Shift-down`| Select all children nodes in syntax tree (**TS**) | `select_all_children` |
153 | `Alt-e` | Move to end of parent node in syntax tree (**TS**) | `move_parent_node_end` |
154 | `Alt-b` | Move to start of parent node in syntax tree (**TS**) | `move_parent_node_start` |
155
156 ### Search
157
158 Search commands all operate on the `/` register by default. To use a different register, use `"<char>`.
159
160 | Key | Description | Command |
161 | ----- | ----------- | ------- |
162 | `/` | Search for regex pattern | `search` |
163 | `?` | Search for previous pattern | `rsearch` |
164 | `n` | Select next search match | `search_next` |
165 | `N` | Select previous search match | `search_prev` |
166 | `*` | Use current selection as the search pattern, automatically wrapping with `\b` on word boundaries | `search_selection_detect_word_boundaries` |
167 | `Alt-*` | Use current selection as the search pattern | `search_selection` |
168
169 ### Minor modes
170
171 These sub-modes are accessible from normal mode and typically switch back to normal mode after a command.
172
173 | Key | Description | Command |
174 | ----- | ----------- | ------- |
175 | `v` | Enter [select (extend) mode](#select--extend-mode) | `select_mode` |
176 | `g` | Enter [goto mode](#goto-mode) | N/A |
177 | `m` | Enter [match mode](#match-mode) | N/A |
178 | `:` | Enter command mode | `command_mode` |
179 | `z` | Enter [view mode](#view-mode) | N/A |
180 | `Z` | Enter sticky [view mode](#view-mode) | N/A |
181 | `Ctrl-w` | Enter [window mode](#window-mode) | N/A |
182 | `Space` | Enter [space mode](#space-mode) | N/A |
183
184 These modes (except command mode) can be configured by
185 [remapping keys](https://docs.helix-editor.com/remapping.html#minor-modes).
186
187 #### View mode
188
189 Accessed by typing `z` in [normal mode](#normal-mode).
190
191 View mode is intended for scrolling and manipulating the view without changing
192 the selection. The "sticky" variant of this mode (accessed by typing `Z` in
193 normal mode) is persistent and can be exited using the escape key. This is
194 useful when you're simply looking over text and not actively editing it.
195
196
197 | Key | Description | Command |
198 | ----- | ----------- | ------- |
199 | `z`, `c` | Vertically center the line | `align_view_center` |
200 | `t` | Align the line to the top of the screen | `align_view_top` |
201 | `b` | Align the line to the bottom of the screen | `align_view_bottom` |
202 | `m` | Align the line to the middle of the screen (horizontally) | `align_view_middle` |
203 | `j`, `down` | Scroll the view downwards | `scroll_down` |
204 | `k`, `up` | Scroll the view upwards | `scroll_up` |
205 | `Ctrl-f`, `PageDown` | Move page down | `page_down` |
206 | `Ctrl-b`, `PageUp` | Move page up | `page_up` |
207 | `Ctrl-u` | Move cursor and page half page up | `page_cursor_half_up` |
208 | `Ctrl-d` | Move cursor and page half page down | `page_cursor_half_down` |
209
210 #### Goto mode
211
212 Accessed by typing `g` in [normal mode](#normal-mode).
213
214 Jumps to various locations.
215
216 | Key | Description | Command |
217 | ----- | ----------- | ------- |
218 | `<n>g`| Go to line number `<n>` | `goto_file_start` |
219 | `g` | Go to the start of the file | `goto_file_start` |
220 | <code>&lt;n&gt;&#124;</code> | Go to column number `<n>` | `goto_column` |
221 | <code>&#124;</code> | Go to the start of line | `goto_column` |
222 | `e` | Go to the end of the file | `goto_last_line` |
223 | `f` | Go to files/URLs in selections | `goto_file` |
224 | `h` | Go to the start of the line | `goto_line_start` |
225 | `l` | Go to the end of the line | `goto_line_end` |
226 | `s` | Go to first non-whitespace character of the line | `goto_first_nonwhitespace` |
227 | `t` | Go to the top of the screen | `goto_window_top` |
228 | `c` | Go to the middle of the screen | `goto_window_center` |
229 | `b` | Go to the bottom of the screen | `goto_window_bottom` |
230 | `d` | Go to definition (**LSP**) | `goto_definition` |
231 | `D` | Go to declaration (**LSP**) | `goto_declaration` |
232 | `y` | Go to type definition (**LSP**) | `goto_type_definition` |
233 | `r` | Go to references (**LSP**) | `goto_reference` |
234 | `i` | Go to implementation (**LSP**) | `goto_implementation` |
235 | `a` | Go to the last accessed/alternate file | `goto_last_accessed_file` |
236 | `m` | Go to the last modified/alternate file | `goto_last_modified_file` |
237 | `n` | Go to next buffer | `goto_next_buffer` |
238 | `p` | Go to previous buffer | `goto_previous_buffer` |
239 | `.` | Go to last modification in current file | `goto_last_modification` |
240 | `j` | Move down textual (instead of visual) line | `move_line_down` |
241 | `k` | Move up textual (instead of visual) line | `move_line_up` |
242 | `w` | Show labels at each word and select the word that belongs to the entered labels | `goto_word` |
243
244 #### Match mode
245
246 Accessed by typing `m` in [normal mode](#normal-mode).
247
248 Please refer to the relevant sections for detailed explanations about [surround](./surround.md) and [textobjects](./textobjects.md).
249
250 | Key | Description | Command |
251 | ----- | ----------- | ------- |
252 | `m` | Goto matching bracket (**TS**) | `match_brackets` |
253 | `s` `<char>` | Surround current selection with `<char>` | `surround_add` |
254 | `r` `<from><to>` | Replace surround character `<from>` with `<to>` | `surround_replace` |
255 | `d` `<char>` | Delete surround character `<char>` | `surround_delete` |
256 | `a` `<object>` | Select around textobject | `select_textobject_around` |
257 | `i` `<object>` | Select inside textobject | `select_textobject_inner` |
258
259 TODO: Mappings for selecting syntax nodes (a superset of `[`).
260
261 #### Window mode
262
263 Accessed by typing `Ctrl-w` in [normal mode](#normal-mode).
264
265 This layer is similar to Vim keybindings as Kakoune does not support windows.
266
267 | Key | Description | Command |
268 | ----- | ------------- | ------- |
269 | `w`, `Ctrl-w` | Switch to next window | `rotate_view` |
270 | `v`, `Ctrl-v` | Vertical right split | `vsplit` |
271 | `s`, `Ctrl-s` | Horizontal bottom split | `hsplit` |
272 | `t`, `Ctrl-t` | Transpose the two adjacent splits | `transpose_view` |
273 | `f` | Go to files/URLs in selections in horizontal splits | `goto_file_hsplit`|
274 | `F` | Go to files/URLs in selections in vertical splits | `goto_file_vsplit`|
275 | `h`, `Ctrl-h`, `Left` | Move to left split | `jump_view_left` |
276 | `j`, `Ctrl-j`, `Down` | Move to split below | `jump_view_down` |
277 | `k`, `Ctrl-k`, `Up` | Move to split above | `jump_view_up` |
278 | `l`, `Ctrl-l`, `Right` | Move to right split | `jump_view_right` |
279 | `q`, `Ctrl-q` | Close current window | `wclose` |
280 | `o`, `Ctrl-o` | Only keep the current window, closing all the others | `wonly` |
281 | `H` | Swap window to the left | `swap_view_left` |
282 | `J` | Swap window downwards | `swap_view_down` |
283 | `K` | Swap window upwards | `swap_view_up` |
284 | `L` | Swap window to the right | `swap_view_right` |
285 | `ns`, `nCtrl-s` | New horizontal split with a scratch buffer | `hsplit_new` |
286 | `nv`, `nCtrl-v` | New vertical split with a scratch buffer | `vsplit_new` |
287
288 #### Space mode
289
290 Accessed by typing `Space` in [normal mode](#normal-mode).
291
292 This layer is a kludge of mappings, mostly pickers.
293
294 | Key | Description | Command |
295 | ----- | ----------- | ------- |
296 | `f` | Open file picker at LSP workspace root | `file_picker` |
297 | `F` | Open file picker at current working directory | `file_picker_in_current_directory` |
298 | `e` | Open file explorer at workspace root | `file_explorer` |
299 | `.` | Open file explorer at current buffer's directory | `file_explorer_in_current_buffer_directory`|
300 | `b` | Open buffer picker | `buffer_picker` |
301 | `j` | Open jumplist picker | `jumplist_picker` |
302 | `g` | Open changed file picker | `changed_file_picker` |
303 | `G` | Debug (experimental) | N/A |
304 | `k` | Show documentation for item under cursor in a [popup](#popup) (**LSP**) | `hover` |
305 | `s` | Open document symbol picker (**LSP** or **TS**) | `lsp_or_syntax_symbol_picker` |
306 | `S` | Open workspace symbol picker (**LSP** or **TS**) | `lsp_or_syntax_workspace_symbol_picker` |
307 | `d` | Open document diagnostics picker (**LSP**) | `diagnostics_picker` |
308 | `D` | Open workspace diagnostics picker (**LSP**) | `workspace_diagnostics_picker` |
309 | `r` | Rename symbol (**LSP**) | `rename_symbol` |
310 | `a` | Apply code action (**LSP**) | `code_action` |
311 | `h` | Select symbol references (**LSP**) | `select_references_to_symbol_under_cursor` |
312 | `'` | Open last fuzzy picker | `last_picker` |
313 | `w` | Enter [window mode](#window-mode) | N/A |
314 | `c` | Comment/uncomment selections | `toggle_comments` |
315 | `C` | Block comment/uncomment selections | `toggle_block_comments` |
316 | `Alt-c` | Line comment/uncomment selections | `toggle_line_comments` |
317 | `p` | Paste system clipboard after selections | `paste_clipboard_after` |
318 | `P` | Paste system clipboard before selections | `paste_clipboard_before` |
319 | `y` | Yank selections to clipboard | `yank_to_clipboard` |
320 | `Y` | Yank main selection to clipboard | `yank_main_selection_to_clipboard` |
321 | `R` | Replace selections by clipboard contents | `replace_selections_with_clipboard` |
322 | `/` | Global search in workspace folder | `global_search` |
323 | `?` | Open command palette | `command_palette` |
324
325 > 💡 Global search displays results in a fuzzy picker, use `Space + '` to bring it back up after opening a file.
326
327 ##### Popup
328
329 Displays documentation for item under cursor. Remapping currently not supported.
330
331 | Key | Description |
332 | ---- | ----------- |
333 | `Ctrl-u` | Scroll up |
334 | `Ctrl-d` | Scroll down |
335
336 ##### Completion Menu
337
338 Displays documentation for the selected completion item. Remapping currently not supported.
339
340 | Key | Description |
341 | ---- | ----------- |
342 | `Shift-Tab`, `Ctrl-p`, `Up` | Previous entry |
343 | `Tab`, `Ctrl-n`, `Down` | Next entry |
344 | `Enter` | Close menu and accept completion |
345 | `Ctrl-c` | Close menu and reject completion |
346
347 Any other keypresses result in the completion being accepted.
348
349 ##### Signature-help Popup
350
351 Displays the signature of the selected completion item. Remapping currently not supported.
352
353 | Key | Description |
354 | ---- | ----------- |
355 | `Alt-p` | Previous signature |
356 | `Alt-n` | Next signature |
357
358 #### Unimpaired
359
360 These mappings are in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaired).
361
362 | Key | Description | Command |
363 | ----- | ----------- | ------- |
364 | `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` |
365 | `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` |
366 | `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` |
367 | `[D` | Go to first diagnostic in document (**LSP**) | `goto_first_diag` |
368 | `]f` | Go to next function (**TS**) | `goto_next_function` |
369 | `[f` | Go to previous function (**TS**) | `goto_prev_function` |
370 | `]t` | Go to next type definition (**TS**) | `goto_next_class` |
371 | `[t` | Go to previous type definition (**TS**) | `goto_prev_class` |
372 | `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` |
373 | `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` |
374 | `]c` | Go to next comment (**TS**) | `goto_next_comment` |
375 | `[c` | Go to previous comment (**TS**) | `goto_prev_comment` |
376 | `]e` | Go to next entry (**TS**) | `goto_next_entry` |
377 | `[e` | Go to previous entry (**TS**) | `goto_prev_entry` |
378 | `]T` | Go to next test (**TS**) | `goto_next_test` |
379 | `[T` | Go to previous test (**TS**) | `goto_prev_test` |
380 | `]p` | Go to next paragraph | `goto_next_paragraph` |
381 | `[p` | Go to previous paragraph | `goto_prev_paragraph` |
382 | `]g` | Go to next change | `goto_next_change` |
383 | `[g` | Go to previous change | `goto_prev_change` |
384 | `]G` | Go to last change | `goto_last_change` |
385 | `[G` | Go to first change | `goto_first_change` |
386 | `[x` | Go to next (X)HTML element | `goto_next_xml_element` |
387 | `]x` | Go to previous (X)HTML element | `goto_prev_xml_element` |
388 | `]Space` | Add newline below | `add_newline_below` |
389 | `[Space` | Add newline above | `add_newline_above` |
390
391 ## Insert mode
392
393 Accessed by typing `i` in [normal mode](#normal-mode).
394
395 Insert mode bindings are minimal by default. Helix is designed to
396 be a modal editor, and this is reflected in the user experience and internal
397 mechanics. Changes to the text are only saved for undos when
398 escaping from insert mode to normal mode.
399
400 > 💡 New users are strongly encouraged to learn the modal editing paradigm
401 > to get the smoothest experience.
402
403 | Key | Description | Command |
404 | ----- | ----------- | ------- |
405 | `Escape` | Switch to normal mode | `normal_mode` |
406 | `Ctrl-s` | Commit undo checkpoint | `commit_undo_checkpoint` |
407 | `Ctrl-x` | Autocomplete | `completion` |
408 | `Ctrl-r` | Insert a register content | `insert_register` |
409 | `Ctrl-w`, `Alt-Backspace` | Delete previous word | `delete_word_backward` |
410 | `Alt-d`, `Alt-Delete` | Delete next word | `delete_word_forward` |
411 | `Ctrl-u` | Delete to start of line | `kill_to_line_start` |
412 | `Ctrl-k` | Delete to end of line | `kill_to_line_end` |
413 | `Ctrl-h`, `Backspace`, `Shift-Backspace` | Delete previous char | `delete_char_backward` |
414 | `Ctrl-d`, `Delete` | Delete next char | `delete_char_forward` |
415 | `Ctrl-j`, `Enter` | Insert new line | `insert_newline` |
416 | `Tab` | [Smart tab] (configurable) | `smart_tab` |
417 | `Shift-Tab` | Insert tab | `insert_tab` |
418
419 [Smart tab]: ./editor.md#editorsmart-tab-section
420
421 These keys are not recommended, but are included for new users less familiar
422 with modal editors.
423
424 | Key | Description | Command |
425 | ----- | ----------- | ------- |
426 | `Up` | Move to previous line | `move_line_up` |
427 | `Down` | Move to next line | `move_line_down` |
428 | `Left` | Backward a char | `move_char_left` |
429 | `Right` | Forward a char | `move_char_right` |
430 | `PageUp` | Move one page up | `page_up` |
431 | `PageDown` | Move one page down | `page_down` |
432 | `Home` | Move to line start | `goto_line_start` |
433 | `End` | Move to line end | `goto_line_end_newline` |
434
435 As you become more comfortable with modal editing, you may want to disable some
436 insert mode bindings. You can do this by editing your `config.toml` file.
437
438 ```toml
439 [keys.insert]
440 up = "no_op"
441 down = "no_op"
442 left = "no_op"
443 right = "no_op"
444 pageup = "no_op"
445 pagedown = "no_op"
446 home = "no_op"
447 end = "no_op"
448 ```
449
450 ## Select / extend mode
451
452 Accessed by typing `v` in [normal mode](#normal-mode).
453
454 Select mode echoes Normal mode, but changes any movements to extend
455 selections rather than replace them. Goto motions are also changed to
456 extend, so that `vgl`, for example, extends the selection to the end of
457 the line.
458
459 Search is also affected. By default, `n` and `N` will remove the current
460 selection and select the next instance of the search term. Toggling this
461 mode before pressing `n` or `N` makes it possible to keep the current
462 selection. Toggling it on and off during your iterative searching allows
463 you to selectively add search terms to your selections.
464
465 ## Picker
466
467 Keys to use within picker. Remapping currently not supported.
468 See the documentation page on [pickers](./pickers.md) for more info.
469 [Prompt](#prompt) keybinds also work in pickers, except where they conflict with picker keybinds.
470
471 | Key | Description |
472 | ----- | ------------- |
473 | `Shift-Tab`, `Up`, `Ctrl-p` | Previous entry |
474 | `Tab`, `Down`, `Ctrl-n` | Next entry |
475 | `PageUp`, `Ctrl-u` | Page up |
476 | `PageDown`, `Ctrl-d` | Page down |
477 | `Home` | Go to first entry |
478 | `End` | Go to last entry |
479 | `Enter` | Open selected |
480 | `Alt-Enter` | Open selected in the background without closing the picker |
481 | `Ctrl-s` | Open horizontally |
482 | `Ctrl-v` | Open vertically |
483 | `Ctrl-t` | Toggle preview |
484 | `Escape`, `Ctrl-c` | Close picker |
485
486 ## Prompt
487
488 Keys to use within prompt, Remapping currently not supported.
489
490 | Key | Description |
491 | ----- | ------------- |
492 | `Escape`, `Ctrl-c` | Close prompt |
493 | `Alt-b`, `Ctrl-Left` | Backward a word |
494 | `Ctrl-b`, `Left` | Backward a char |
495 | `Alt-f`, `Ctrl-Right` | Forward a word |
496 | `Ctrl-f`, `Right` | Forward a char |
497 | `Ctrl-e`, `End` | Move prompt end |
498 | `Ctrl-a`, `Home` | Move prompt start |
499 | `Ctrl-w`, `Alt-Backspace`, `Ctrl-Backspace` | Delete previous word |
500 | `Alt-d`, `Alt-Delete`, `Ctrl-Delete` | Delete next word |
501 | `Ctrl-u` | Delete to start of line |
502 | `Ctrl-k` | Delete to end of line |
503 | `Backspace`, `Ctrl-h`, `Shift-Backspace` | Delete previous char |
504 | `Delete`, `Ctrl-d` | Delete next char |
505 | `Ctrl-s` | Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
506 | `Ctrl-p`, `Up` | Select previous history |
507 | `Ctrl-n`, `Down` | Select next history |
508 | `Ctrl-r` | Insert the content of the register selected by following input char |
509 | `Tab` | Select next completion item |
510 | `BackTab` | Select previous completion item |
511 | `Enter` | Open selected |