kakoune plugin that allows you to select increasingly larger regions of text using the same key combination.
It aims to be similar to features from other editors:
- Vim's expand region
- Emac's expand region
- IntelliJ's syntax aware selection
- Eclipse's select enclosing element
Warning: this project is still in beta.
Add expand-region.kak
to your autoload dir: ~/.config/kak/autoload/
.
Run the expand
command successively.
# Suggested mapping
map global normal + :expand<ret>
Here are two simple linewise commands that your may also find useful:
def grow-selection %{
exec '<a-:>L<a-;>H'
}
def shrink-selection %{
exec '<a-:>H<a-;>L'
}
- kakoune-expand: this alternative version made by occivink offers the
:expand-repeat
command. - kak-tree: use the
tree-select-parent-node
command to traverse the AST. - kakoune-grasp: AST selector specific to JavaScript
MIT