You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raw Kakoune has commands to add and move selections through the file's linear structure, like h and C and ]p.
kak-tree has commands to add and move selections through the file's hierarchical structure, like tree-select-node and tree-select-prev-node and tree-select-children.
Raw Kakoune also has commands to sub-select and filter selections based on the file's linear structure, like s and k.
kak-tree should have commands to sub-select and filter selections based on the file's hierarchical structure:
tree-select-nodes KIND selects all the KIND nodes wholly contained within an existing selection
tree-split-nodes KIND slices the KIND nodes out of existing selections
not so useful in a hierarchical context, but for completeness and by analogy with Kakoune's core operators
tree-keep-matching KIND discards selections that do not wholly contain at least one KIND node
tree-kill-matching KIND discards selections that do wholly contain at least one KIND node
Ideally, these commands should use -shell-script-candidates to let Kakoune auto-complete the possible kinds for the current file.
There's possible extension here for kind-paths, like arguments/string_literal to only select string_literals directly inside an arguments or /arguments//string_literal to select string_literals anywhere inside whichever selections exactly cover an arguments, but that's all polish and future extension work.
The text was updated successfully, but these errors were encountered:
Just to track progress: tree-select-nodes KIND is done by tree-select-children which takes an optional parameter KIND. Other commands are not implemented yet.
Raw Kakoune has commands to add and move selections through the file's linear structure, like
h
andC
and]p
.kak-tree has commands to add and move selections through the file's hierarchical structure, like
tree-select-node
andtree-select-prev-node
andtree-select-children
.Raw Kakoune also has commands to sub-select and filter selections based on the file's linear structure, like
s
andk
.kak-tree should have commands to sub-select and filter selections based on the file's hierarchical structure:
tree-select-nodes KIND
selects all the KIND nodes wholly contained within an existing selectiontree-split-nodes KIND
slices the KIND nodes out of existing selectionstree-keep-matching KIND
discards selections that do not wholly contain at least one KIND nodetree-kill-matching KIND
discards selections that do wholly contain at least one KIND nodeIdeally, these commands should use
-shell-script-candidates
to let Kakoune auto-complete the possible kinds for the current file.There's possible extension here for kind-paths, like
arguments/string_literal
to only selectstring_literal
s directly inside anarguments
or/arguments//string_literal
to selectstring_literal
s anywhere inside whichever selections exactly cover anarguments
, but that's all polish and future extension work.The text was updated successfully, but these errors were encountered: