As most of you probably know, you can use %
to search forwards on the line to find the next paired brace/bracket/paren and move to its matched partner:
|a|rray[index] = value;
" |e| is the cursor; hit %:
array[index|]| = value;
I am hoping there is a similar key that searches backwards on the line, e.g.:
array[index] = value|;|
" |;| is the cursor again, hit the key I'm looking for:
array|[|index] = value;
Most vim commands have both a backwards and forwards, so it seems this should to. Does it not have a partner? If so, is that because once it's on a paired character they would act the same?
%
not only searches for the paired bracket on the same line, but further down the file. I like it especially for loops etc in any program language of choice.g%
command that seems similar to what you are looking for.