Indent multiple lines over cursor in Vim

I know that it 3>>will back out from the current line and the two lines under the cursor. How to delay the current line and two lines above?

+5
source share
2 answers

He must work with

:-2,.>

or

>2k

Or, select the line and two above in visual mode, and then simply enter >.

:he shift-left-rightcontains additional information about the transition.
:he :rangestells you more about setting ranges for the team.

+5
source

2>k(or >2k)

Remember from the manual

                          *>>*
>>            Shift [count] lines one 'shiftwidth' rightwards.

But also,

                          *>*
>{motion}     Shift {motion} lines one 'shiftwidth' rightwards.
+1
source

All Articles