What's wrong with configuring your editor to convert tabs to spaces? 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.

On 8/14/2011 2:36 PM, Nick Sabalausky wrote:
Ok, I'm one of the "tab-indent" fans, and obviously there are others out
there. So in contributing some pull requests to phobos/rdmd I've noticed how
easy it is to forget to convert tabs->spaces before pushing. And others make
the same mistake too. Aside from being an inconsistent syle issue, this
seems to increase the chances of merge conflicts.

Obviously I could set up some script on my end to auto-check before
committing, but that's a per-user solution and so wouldn't really help the
overall problem. Plus it probably wouldn't work with the GUI git tools like
tortoise.

I don't know if this has already been looked into, but to any git/github
gurus here: Is there some way to set up the "D-Programming-Language"
projects (either in git or in github) so that users get warned when they
have tab indents and try to commit, push, or pull-request (any one of those
three, wouldn't need to be all three of them)?

-------------------------------
Not sent from an iPhone.



Reply via email to