Reputation: 110205
I like going into visual mode so that I have nice feedback on what's selected for an action. For example, if I press:
Shiftv}
Now I have my selection all set.
And I'd like to do a certain number of tabs -- perhaps 4, 5, or 6 (I cannot tell until I actually do them and things are 'lined up').
However, if I then press:
>>
It tabs by one and then exits visual mode. Is there a way to stay in visual mode when I'm adjusting tabs and such so that I can do something like:
>>>>>>>>>> (too far) << (good)
Upvotes: 1
Views: 36
Reputation: 27822
You can remap <
and >
to automatically re-select the last selection with gv
:
vnoremap > >gv
vnoremap < <gv
You can also do this for other mappings, as well.
Upvotes: 2