Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'book/src/keymap.md')
| -rw-r--r-- | book/src/keymap.md | 152 |
1 files changed, 67 insertions, 85 deletions
diff --git a/book/src/keymap.md b/book/src/keymap.md index 95662f71..402b83ef 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -35,8 +35,6 @@ Normal mode is the default mode when you launch helix. You can return to it from > NOTE: Unlike Vim, `f`, `F`, `t` and `T` are not confined to the current line. -> Hereafter, `<n>` represents an integer by typing a sequence of digits. - | Key | Description | Command | | ----- | ----------- | ------- | | `h`, `Left` | Move left | `move_char_left` | @@ -49,11 +47,11 @@ Normal mode is the default mode when you launch helix. You can return to it from | `W` | Move next WORD start | `move_next_long_word_start` | | `B` | Move previous WORD start | `move_prev_long_word_start` | | `E` | Move next WORD end | `move_next_long_word_end` | -| `t` | Find till next char | `find_till_char` | +| `t` | Find 'till next char | `find_till_char` | | `f` | Find next char | `find_next_char` | -| `T` | Find till previous char | `till_prev_char` | +| `T` | Find 'till previous char | `till_prev_char` | | `F` | Find previous char | `find_prev_char` | -| `<n>G`, `<n>gg` | Go to line number `<n>` | `goto_line` | +| `G` | Go to line number `<n>` | `goto_line` | | `Alt-.` | Repeat last motion (`f`, `t`, `m`, `[` or `]`) | `repeat_last_motion` | | `Home` | Move to the start of the line | `goto_line_start` | | `End` | Move to the end of the line | `goto_line_end` | @@ -114,43 +112,39 @@ Normal mode is the default mode when you launch helix. You can return to it from ### Selection manipulation -| Key | Description | Command | -| ----- | ----------- | ------- | -| `s` | Select all regex matches inside selections | `select_regex` | -| `S` | Split selection into sub selections on regex matches | `split_selection` | -| `Alt-s` | Split selection on newlines | `split_selection_on_newline` | -| `Alt-minus` | Merge selections | `merge_selections` | -| `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` | -| `&` | Align selection in columns | `align_selections` | -| `_` | Trim whitespace from the selection | `trim_selections` | -| `;` | Collapse selection onto a single cursor | `collapse_selection` | -| `Alt-;` | Flip selection cursor and anchor | `flip_selections` | -| `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` | -| `,` | Keep only the primary selection | `keep_primary_selection` | -| `Alt-,` | Remove the primary selection | `remove_primary_selection` | -| `C` | Copy selection onto the next line (Add cursor below) | `copy_selection_on_next_line` | -| `Alt-C` | Copy selection onto the previous line (Add cursor above) | `copy_selection_on_prev_line` | -| `(` | Rotate main selection backward | `rotate_selections_backward` | -| `)` | Rotate main selection forward | `rotate_selections_forward` | -| `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` | -| `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` | -| `%` | Select entire file | `select_all` | -| `x` | Select current line, if already selected, extend to next line | `extend_line_below` | -| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` | -| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` | -| `J` | Join lines inside selection | `join_selections` | -| `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` | -| `K` | Keep selections matching the regex | `keep_selections` | -| `Alt-K` | Remove selections matching the regex | `remove_selections` | -| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` | -| `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` | -| `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` | -| `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` | -| `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` | -| `Alt-a` | Select all sibling nodes in syntax tree (**TS**) | `select_all_siblings` | -| `Alt-I`, `Alt-Shift-down`| Select all children nodes in syntax tree (**TS**) | `select_all_children` | -| `Alt-e` | Move to end of parent node in syntax tree (**TS**) | `move_parent_node_end` | -| `Alt-b` | Move to start of parent node in syntax tree (**TS**) | `move_parent_node_start` | +| Key | Description | Command | +| ----- | ----------- | ------- | +| `s` | Select all regex matches inside selections | `select_regex` | +| `S` | Split selection into sub selections on regex matches | `split_selection` | +| `Alt-s` | Split selection on newlines | `split_selection_on_newline` | +| `Alt-minus` | Merge selections | `merge_selections` | +| `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` | +| `&` | Align selection in columns | `align_selections` | +| `_` | Trim whitespace from the selection | `trim_selections` | +| `;` | Collapse selection onto a single cursor | `collapse_selection` | +| `Alt-;` | Flip selection cursor and anchor | `flip_selections` | +| `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` | +| `,` | Keep only the primary selection | `keep_primary_selection` | +| `Alt-,` | Remove the primary selection | `remove_primary_selection` | +| `C` | Copy selection onto the next line (Add cursor below) | `copy_selection_on_next_line` | +| `Alt-C` | Copy selection onto the previous line (Add cursor above) | `copy_selection_on_prev_line` | +| `(` | Rotate main selection backward | `rotate_selections_backward` | +| `)` | Rotate main selection forward | `rotate_selections_forward` | +| `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` | +| `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` | +| `%` | Select entire file | `select_all` | +| `x` | Select current line, if already selected, extend to next line | `extend_line_below` | +| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` | +| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` | +| `J` | Join lines inside selection | `join_selections` | +| `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` | +| `K` | Keep selections matching the regex | `keep_selections` | +| `Alt-K` | Remove selections matching the regex | `remove_selections` | +| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` | +| `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` | +| `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` | +| `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` | +| `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` | ### Search @@ -162,8 +156,7 @@ Search commands all operate on the `/` register by default. To use a different r | `?` | Search for previous pattern | `rsearch` | | `n` | Select next search match | `search_next` | | `N` | Select previous search match | `search_prev` | -| `*` | Use current selection as the search pattern, automatically wrapping with `\b` on word boundaries | `search_selection_detect_word_boundaries` | -| `Alt-*` | Use current selection as the search pattern | `search_selection` | +| `*` | Use current selection as the search pattern | `search_selection` | ### Minor modes @@ -214,10 +207,7 @@ Jumps to various locations. | Key | Description | Command | | ----- | ----------- | ------- | -| `<n>g`| Go to line number `<n>` | `goto_file_start` | -| `g` | Go to the start of the file | `goto_file_start` | -| <code><n>|</code> | Go to column number `<n>` | `goto_column` | -| <code>|</code> | Go to the start of line | `goto_column` | +| `g` | Go to line number `<n>` else start of file | `goto_file_start` | | `e` | Go to the end of the file | `goto_last_line` | | `f` | Go to files in the selections | `goto_file` | | `h` | Go to the start of the line | `goto_line_start` | @@ -288,7 +278,7 @@ This layer is a kludge of mappings, mostly pickers. | Key | Description | Command | | ----- | ----------- | ------- | -| `f` | Open file picker at LSP workspace root | `file_picker` | +| `f` | Open file picker | `file_picker` | | `F` | Open file picker at current working directory | `file_picker_in_current_directory` | | `b` | Open buffer picker | `buffer_picker` | | `j` | Open jumplist picker | `jumplist_picker` | @@ -330,14 +320,10 @@ Displays documentation for item under cursor. Remapping currently not supported. Displays documentation for the selected completion item. Remapping currently not supported. -| Key | Description | -| ---- | ----------- | -| `Shift-Tab`, `Ctrl-p`, `Up` | Previous entry | -| `Tab`, `Ctrl-n`, `Down` | Next entry | -| `Enter` | Close menu and accept completion | -| `Ctrl-c` | Close menu and reject completion | - -Any other keypresses result in the completion being accepted. +| Key | Description | +| ---- | ----------- | +| `Shift-Tab`, `Ctrl-p`, `Up` | Previous entry | +| `Tab`, `Ctrl-n`, `Down` | Next entry | ##### Signature-help Popup @@ -352,32 +338,30 @@ Displays the signature of the selected completion item. Remapping currently not These mappings are in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaired). -| Key | Description | Command | -| ----- | ----------- | ------- | -| `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` | -| `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` | -| `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` | -| `[D` | Go to first diagnostic in document (**LSP**) | `goto_first_diag` | -| `]f` | Go to next function (**TS**) | `goto_next_function` | -| `[f` | Go to previous function (**TS**) | `goto_prev_function` | -| `]t` | Go to next type definition (**TS**) | `goto_next_class` | -| `[t` | Go to previous type definition (**TS**) | `goto_prev_class` | -| `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` | -| `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` | -| `]c` | Go to next comment (**TS**) | `goto_next_comment` | -| `[c` | Go to previous comment (**TS**) | `goto_prev_comment` | -| `]T` | Go to next test (**TS**) | `goto_next_test` | -| `[T` | Go to previous test (**TS**) | `goto_prev_test` | -| `]p` | Go to next paragraph | `goto_next_paragraph` | -| `[p` | Go to previous paragraph | `goto_prev_paragraph` | -| `]g` | Go to next change | `goto_next_change` | -| `[g` | Go to previous change | `goto_prev_change` | -| `]G` | Go to last change | `goto_last_change` | -| `[G` | Go to first change | `goto_first_change` | -| `[x` | Go to next (X)HTML element | `goto_next_xml_element` | -| `]x` | Go to previous (X)HTML element | `goto_prev_xml_element` | -| `]Space` | Add newline below | `add_newline_below` | -| `[Space` | Add newline above | `add_newline_above` | +| Key | Description | Command | +| ----- | ----------- | ------- | +| `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` | +| `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` | +| `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` | +| `[D` | Go to first diagnostic in document (**LSP**) | `goto_first_diag` | +| `]f` | Go to next function (**TS**) | `goto_next_function` | +| `[f` | Go to previous function (**TS**) | `goto_prev_function` | +| `]t` | Go to next type definition (**TS**) | `goto_next_class` | +| `[t` | Go to previous type definition (**TS**) | `goto_prev_class` | +| `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` | +| `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` | +| `]c` | Go to next comment (**TS**) | `goto_next_comment` | +| `[c` | Go to previous comment (**TS**) | `goto_prev_comment` | +| `]T` | Go to next test (**TS**) | `goto_next_test` | +| `[T` | Go to previous test (**TS**) | `goto_prev_test` | +| `]p` | Go to next paragraph | `goto_next_paragraph` | +| `[p` | Go to previous paragraph | `goto_prev_paragraph` | +| `]g` | Go to next change | `goto_next_change` | +| `[g` | Go to previous change | `goto_prev_change` | +| `]G` | Go to last change | `goto_last_change` | +| `[G` | Go to first change | `goto_first_change` | +| `]Space` | Add newline below | `add_newline_below` | +| `[Space` | Add newline above | `add_newline_above` | ## Insert mode @@ -452,8 +436,6 @@ you to selectively add search terms to your selections. ## Picker Keys to use within picker. Remapping currently not supported. -See the documentation page on [pickers](./pickers.md) for more info. -[Prompt](#prompt) keybinds also work in pickers, except where they conflict with picker keybinds. | Key | Description | | ----- | ------------- | |