VIM^s#03 Indent the whole file
This is a very interesting requirement that I came across and as usual I started looking for solutions.
How do I auto-indent the whole file in one shot?
In VIM, it turned out to be very simple than I thought. Its,
gg – would take you to the first line of the file
= – would invoke the auto-indentation
G – would tell to do it till the last line of the file.
Isn’t that wonderful?
For further/eloborate details on the same, checkout the following link:
About this entry
You’re currently reading “VIM^s#03 Indent the whole file,” an entry on Flashes of Insight
- May 18, 2010 / 4:25 pm