vim-matchup
vim-matchup copied to clipboard
An option to jump backwards
Hi, I would like to be able to jump to the start of the previous pair of brackets or to the previous block. For example,
[^ tohere ] [ fromhere ]
where ^ is the exact final position.
where the forward motion(the opposite) is already implemented by z%
.
Thanks.
Interesting idea. Can you suggest a convenient mapping? Otherwise this can be an opt-in <plug>
map.
Great. Actually, I reserved this to something really similar, but &
or c-%
.
I think this issue can be closed pending some documentation as the opposite of z%
is already implemented as <plug>(matchup-Z%)
. There are no default key mappings, though, and Z%
is not listed in the docs. I am not sure if there is a reason Z%
doesn't appear in the docs or if a PR would be welcome? In any case, both of these motions are very helpful - thanks!
@adriantrunzo Thanks, I was never really satisfied with this motion's implementation, I kept running into ergonomic issues when testing, and never got a chance to revisit it. Would you mind testing it a bit and raising some issues?
nmap Z% <plug>(matchup-Z%)