How do I select the surrounding parentheses similar to vim-surround? I know I can do <alt-a>(
or m
to select the text in between, but how do I get two cursors at the end?
How to select surrounding parentheses?
1.2k Views Asked by Blubber At
2
vim-surround
functionality was implemented by kakoune-surround plugin, but, if you prefer "vanilla experience", you can change parenthesis to, say, square brackets usingselect
:m
— select the closest matching parenthesis (or by<alt-a>)
, as you mentioned);s\(|\)<return>
— select(
and)
using regex;<space>
— clear selections (cursor will be positioned on the last match);r]
— change)
to]
;<alt-n>
— select previous match (it will be(
according to our regex);r[
— change(
to[
.