git gurus: Any way to set it up to auto-warn contributors about tab indents?

Nick Sabalausky a at a.a
Sun Aug 14 12:55:19 PDT 2011


"dsimcha" <dsimcha at yahoo.com> wrote in message 
news:j295at$1rki$1 at digitalmars.com...
> What's wrong with configuring your editor to convert tabs to spaces?

Because this is a per-project matter, not a universal one. On all of my 
projects, I *want* tabs for indentation (why? because I said so ;) ) and so 
that's how I have my editor set up. But DMD/phobos/etc use spaces. I'm not 
going to switch my normal style just because one project I contribute to 
does it differently, and neither are other people.

> I know CodeBlocks, Vim and Notepad++ do this for you if you configure them 
> right (though I don't remember exactly how to configure Vim to do this). 
> Any other editor worth its salt should, too.  I use this for all my code, 
> not just Phobos.  I prefer to type a tab because it's much easier to type 
> than some specific number of spaces, but I prefer to have spaces in my 
> code because they take up a consistent amount of columns on all viewers, 
> whereas different tab stops can really make your code look messy.
>

I really don't want this to turn into another tabs vs spaces debate. Bottom 
line is, some people prefer tabs, some prefer spaces, and that's just how it 
is. But *both* camps contribute to DMD/phobos/etc which currently leads to 
some oversights in consistency because there's no project-wide automatic 
checking.




More information about the Digitalmars-d mailing list