Current it quits the visual mode after indenting once,which is very annoying.

link|improve this question
1  
For indenting more than once, simply use the . key to repeat the last operation – barbaz Jul 14 '11 at 9:47
feedback

1 Answer

up vote 5 down vote accepted

You can use the normal mode command gv to highlight the previous visual selection. Therefore, you could use the following mappings:

:vmap < <gv
:vmap > >gv

The :vmap command sets up a mapping that will work only in visual mode. You are therefore rebinding the < and > visual mode commands to perform the indent and immediately re-select the previous visual selection.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.