15
Duplicate:
Sometimes I want to indent a block of C code in Vim. I usually ended up tabbing it line by line.
What is a better/faster way?
Sometimes I want to indent a block of C code in Vim. I usually ended up tabbing it line by line.
What is a better/faster way?
If you have unindented code that looks like this...
if (foo)
{
/* line 1 */
/* line 2 */
/* line 3 */
}
...place your cursor on "line 1" in command mode and type 3==, where 3 is the number of lines to indent.