(Currently not fully documented, see the keymappings list for more.)
See tutor.txt (accessible via
hx --tutor or
:tutor) for a vimtutor-like introduction.
Vim-like registers can be used to yank and store text to be pasted later. Usage is similar, with
" being used to select a register:
"ay- Yank the current selection to register
"op- Paste the text in register
oafter the selection.
If 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:
"hc- Store the selection in register
hand then change it (delete and enter insert mode).
"md- Store the selection in register
mand delete it.
|Last executed command|
|Last yanked text|
There is no special register for copying to system clipboard, instead special commands and keybindings are provided. See the keymap for the specifics. The black hole register works as a no-op register, meaning no data will be written to / read from it.
ms- Add surround characters
mr- Replace surround characters
md- Delete surround characters
ms acts on a selection, so select the text first and use
on the closest pairs found and selections are not required; use counts to act in outer pairs.
It can also act on multiple seletions (yay!). For example, to change every occurance of
%to select the whole file
sto split the selections on a search term
useand hit Enter
mr([to replace the parens with square brackets
Multiple characters are currently not supported, but planned.
ma- Select around the object (
mi- Select inside the object (
|Key after ||Textobject selected|
|Specified surround pairs|
c, etc need a tree-sitter grammar active for the current
document and a special tree-sitter query file to work properly. Only
currently have the query file implemented. Contributions are welcome !