vim-matchup
vim-matchup copied to clipboard
Ignore brackets for particular motions
trafficstars
Hello,
is it possible to ignore brackets for these motions: [%, ]%, i%, a%, z% (i.e. all except % and g%) somehow? Given this piece of Lua code as an example:
if true then print({['key'] = 'value'}) end
| ||| |
4 ||1 0
|2
3
I'd like [% jump directly to 4, skipping 1, 2 and 3.
Could be a good alternative to the builtin [{ and ]} motions for languages that don't use curly brackets to denote a block of code.
Is it safe to assume you'll want to ignore symbols like {[( but jump to all active words like if, function, etc..?
Yes. And don't ignore these symbols for % and g% (I haven't showed that in the example).