Tree-sitter hjkl
mode
Use the toggle key to switch to ts mode, then hjkl
to scope in/out or move to the next/previous sibling. The toggle map is <M-v>
(Alt-v
) and nodes are selected by default. Toggle, movement keys, extmark highlights and select mode can be configured - check init.lua to see configuration and defaults.
tshjkl_intro.mp4
Unwrapping a function
- toggle on the inner body
d
- toggle the node to replace
p
tshjkl_example_remove_wrap.mp4
use 'gsuuon/tshjkl.nvim'
Check binds for more
v
— visual select the current node (if config.select_current_node
is false)
b
— visual select backwards
h
— parent
j
— next sibling
k
— previous sibling
l
— child
H
— top-most parent
J
— last sibling
K
— first sibling
L
— inner-most child
- Can switch between highlight and select mode
- we can select from highlight mode but it would be nice to be able to toggle this