Loose Whitespace Annoys Me
Posted by Adam Wiggins on April 04, 2008 at 03:46 PM
It tickles me to death that Git highlights loose whitespace in red.

I may be showing my obsessive-compulsive side here, but one thing I don't like about TextMate is that it indents blank lines. (Other editors, such as vim and emacs, remove the superfluous whitespace when you press enter twice on an indented block. That is, they never save a file which has a blank line containing whitespace; blank lines are always just a newline and nothing else.)
I'd be ok with it if it was consistent, but it isn't. Which is why you end up with blank lines with whitespace that doesn't match nearby indents. Hardly a showstopper, but it does mean that I end up wasting time chasing whitespace around when I should be coding. (Britt Selvitelle agrees, and offers some tricks to work around TextMate's inherent whitespace sloppiness.) Maybe now that Git is all the rage, the TextMate author will be encouraged to change its handling of whitespace.
Update: You only get colorized diffs if you have this in your $HOME/.gitconfig:
[color] diff=auto
Comments
There are 4 comments on this post. Post yours →
You can also use git-config to get color working:
git config —global color.diff auto git config —global color.status auto git config —global color.branch auto
Let's try that again:
git config —global color.diff auto
git config —global color.status auto
git config —global color.branch auto
(And that should be dash-dash global.)
A shortcut to set all three is:
git config —global color.ui auto
Post a comment
Required fields in bold.