4 ms·
What language is your code in? If it's a curly-brace language (c, c++, java, etc.), then the following should properly indent everything using Vim: gg=G If
by apu 18y ago
What language is your code in? If it's a curly-brace language (c, c++, java, etc.), then the following should properly indent everything using Vim:
gg=G
If not (or if that doesn't work right), you can use visual mode to quickly change indents on large sections at once:
Select a set of lines using:
V
and then press (for example):
2>
to add 2 tabs to the beginning of the selected lines.
Or to go the other way (remove 2 tabs):
2<