ul / kak-tree

Structural selections for Kakoune
The Unlicense
100 stars 10 forks source link

Modifying selections with path patterns #4

Open Screwtapello opened 5 years ago

Screwtapello commented 5 years ago

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:

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.

ul commented 5 years ago

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.