Wednesday, February 14, 2007

Indentation fix using vim

I know, I know, you are supposed to indent every line religiously, and use "cindent" or "autoindent" within vim to make your job easier.

But, (there's always a but), sometimes you are hacking something together, and you don't care...
Sometimes you are hacking OPC (other people's code.....similar to OPM other people's money), and its ugly....

You don't want to indent every line. What do you do?

In command mode within vim type "gg=G", and see how magic is made.....(It is "gg=G", not ":gg=G")...

No comments: