[lug] Source Code Pretty-fying

rm at fabula.de rm at fabula.de
Tue Sep 14 17:12:33 MDT 2004

On Tue, Sep 14, 2004 at 04:50:33PM -0600, Matt Thompson wrote:
> OK, folks, this is a dumb question, but apparently I can't get Google to 
> look for what I'm asking for.
> I have some C code that has been hacked on by about 4-5 people. 
> Apparently, each person had their own idea on what "tab" should do.  I 
> say 3 spaces, another said 2 spaces, another said the hard \t.  So, when 
> I open this code in VIM, I get code that is wacky-indented.  You know, 
> some lines inside like 3 if's are underindented, etc.
> Thus, I figured there has to be some utility that will resolve this and 
> impose regular indenting.  Heck, there might be something for VIM, but I 
> couldn't see it.  Any help?

You look for something better than 'indent' ? I usually just do the reformatting
from within emacs (M-x indent-region) but every once in a while i do use 'indent'.
The only problem i had so far was the enormous amount of configuration options ...
allmost as many switches as 'ls' ;-)

 Ralf Mattes

> Matt
> -- 
> Learning just means you were wrong and they were right. - Aram
>    Matt Thompson -- http://ucsub.colorado.edu/~thompsma/
>    440 UCB, Boulder, CO  80309-0440
>    JILA A510, 303-492-4662
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

More information about the LUG mailing list