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.
Raw Kakoune has commands to add and move selections through the file's linear structure, like
handCand]p.kak-tree has commands to add and move selections through the file's hierarchical structure, like
tree-select-nodeandtree-select-prev-nodeandtree-select-children.Raw Kakoune also has commands to sub-select and filter selections based on the file's linear structure, like
sandk.kak-tree should have commands to sub-select and filter selections based on the file's hierarchical structure:
tree-select-nodes KINDselects all the KIND nodes wholly contained within an existing selectiontree-split-nodes KINDslices the KIND nodes out of existing selectionstree-keep-matching KINDdiscards selections that do not wholly contain at least one KIND nodetree-kill-matching KINDdiscards selections that do wholly contain at least one KIND nodeIdeally, these commands should use
-shell-script-candidatesto let Kakoune auto-complete the possible kinds for the current file.There's possible extension here for kind-paths, like
arguments/string_literalto only selectstring_literals directly inside anargumentsor/arguments//string_literalto selectstring_literals anywhere inside whichever selections exactly cover anarguments, but that's all polish and future extension work.