Reputation: 9134
I know that 3>>
will indent the current line and the two lines below the cursor. How do I indent the current line and the two lines above?
Upvotes: 5
Views: 272
Reputation: 90742
2>k (or >2k)
Remember from the manual,
*>>* >> Shift [count] lines one 'shiftwidth' rightwards.
But also,
*>* >{motion} Shift {motion} lines one 'shiftwidth' rightwards.
Upvotes: 1
Reputation: 67047
It should be working with
:-2,.>
or
>2k
Or, select the line and the two above in visual mode and then just type >.
:he shift-left-right
has more information about shifting.
:he :ranges
tells you more about specifying ranges for a command.
Upvotes: 5