How can I move to the next text object?
E.g. with cursor on the first ,
in
{}, {}, {}
^
then calling va}
selects the middle {}
. This is the behaviour I want to be able to achieve consistently, even in cases like this:
{{}, {}, {}}
^
This time, va{
selects the entire line.
How can I always move to the next text object? I.e., the cursor should not end up in an earlier position in the file after.
Here are the results of successively moving to the "next" a}
text object as I consider it:
{{}, {{}, {}}, {}}
^
{{}, {{}, {}}, {}}
^
{{}, {{}, {}}, {}}
^
{{}, {{}, {}}, {}}
^
{{}, {{}, {}}, {}}
^
{{}, {{}, {}}, {}}
^
And after that, there is no "next" a}
text object.
This should work across lines too, just like default text objects do. E.g. with the cursor in the first line first column (on the v
) here, pressing vi{
selects the {}
successfully.
vim stackexchange
text objects visual
mode {} movement
I hope the next-text-object movement will do the same.