Reputation: 1
I've searched on google but i've found nothing ! When i'm in vim, and i am on a line, like called line x, i want that hitting tab, will make all the line indented, and not just the character. How i do that ?
Thanks !
Upvotes: 0
Views: 381
Reputation: 2690
In insert mode, hit Ctrl-T
to indent and Ctrl-D
to deindent.
In command mode, use the shift commands <
and >
. Those accept count prefixes, movement suffixes and regions like most other Vim commands. To work only on the current line, hit the corresponding key twice.
When indenting regions, after the shift command you lose selection. Hit .
repeat the shift on the same region.
You can also use =
in command mode to autoindent.
Upvotes: 6