but 5 times
I am not trying to indent multiple lines.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
You can use
:>. Just repeat
> as many times as you want to shift. For example if you want to shift 5 times use
:>>>>>. Personally I would just use
>> and then repeat the command with the
. (repeat) command.
For more help see:
:h :> :h >> :h .
As an addition to Peter Rincker's answer, you can also enter visual-line mode (Shift+v) and use > with a count. Unlike in normal mode, the count is used to specify how many
shiftwidths to indent.
If you prefer the comfort of giving a hard count, this is the only option that I'm aware of outside of a plugin or custom function.
shift-v to visually select the line, or block of lines.
Then in normal mode press