3(Currently not fully documented, see the [keymappings](./keymap.md) list for more.)
5See [tutor.txt](https://github.com/helix-editor/helix/blob/master/runtime/tutor.txt) (accessible via `hx --tutor` or `:tutor`) for a vimtutor-like introduction.
9Vim-like registers can be used to yank and store text to be pasted later. Usage is similar, with `"` being used to select a register:
11- `"ay` - Yank the current selection to register `a`.
12- `"op` - Paste the text in register `o` after the selection.
14If there is a selected register before invoking a change or delete command, the selection will be stored in the register and the action will be carried out:
16- `"hc` - Store the selection in register `h` and then change it (delete and enter insert mode).
17- `"md` - Store the selection in register `m` and delete it.
21| Register character | Contains |
24| `:` | Last executed command |
25| `"` | Last yanked text |
28> There is no special register for copying to system clipboard, instead special commands and keybindings are provided. See the [keymap](keymap.md#space-mode) for the specifics.
29> The black hole register works as a no-op register, meaning no data will be written to / read from it.
33Functionality similar to [vim-surround](https://github.com/tpope/vim-surround) is built into
34helix. The keymappings have been inspired from [vim-sandwich](https://github.com/machakann/vim-sandwich):
36
38- `ms` - Add surround characters
39- `mr` - Replace surround characters
40- `md` - Delete surround characters
42`ms` acts on a selection, so select the text first and use `ms<char>`. `mr` and `md` work
43on the closest pairs found and selections are not required; use counts to act in outer pairs.
45It can also act on multiple seletions (yay!). For example, to change every occurance of `(use)` to `[use]`:
47- `%` to select the whole file
48- `s` to split the selections on a search term
49- Input `use` and hit Enter
50- `mr([` to replace the parens with square brackets
52Multiple characters are currently not supported, but planned.
56Currently supported: `word`, `surround`, `function`, `class`, `parameter`.
58
59
61- `ma` - Select around the object (`va` in vim, `<alt-a>` in kakoune)
62- `mi` - Select inside the object (`vi` in vim, `<alt-i>` in kakoune)
64| Key after `mi` or `ma` | Textobject selected |
68| `(`, `[`, `'`, etc | Specified surround pairs |
73Note: `f`, `c`, etc need a tree-sitter grammar active for the current
74document and a special tree-sitter query file to work properly. [Only
75some grammars](https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+filename%3Atextobjects.scm&type=Code&ref=advsearch&l=&l=)
76currently have the query file implemented. Contributions are welcome !
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