Warning: for namespacing reasons, the command names recently changed as follow:
select-down -> vertical-selection-down select-up -> vertical-selection-up select-vertically -> vertical-selection-up-and-down
kakoune plugin to copy the current selection up and downwards to all lines matching the current selection.
vertical-selection.kak to your autoload directory,
~/.config/kak/autoload, or source it manually.
The script defines three commands:
select-vertically. They respectively select all lines directly below, above and both that contain the current selection at the same position.
Calling any of the commands with a multi-line selection is undefined behavior.
I suggest the following mappings:
map global user v ': vertical-selection-down<ret>' map global user <a-v> ': vertical-selection-up<ret>' map global user V ': vertical-selection-up-and-down<ret>'
See also kakoune-text-objects, for integrating this plugin into your text objects.
- #1115: Binding to copy selections vertically to equal substrings
- #1116: Keybinding for copying selections on matching substrings vertically