Coloring white space in git-diff’s output

Regarding code formatting I’m kind of purist :). I very often remove unnecessary white spaces (lines with only ws, ws at the end of lines etc). I even have set vim to show that kind of lines colored to red.

My problem is that using git-diff I often see something like this:

-      else{ 
+      else{

Even if I have git-diff colored I can’t see difference (in that particular situation I removed 1 ws at the end of line). Is there any way to tell git-diff to show that ws colored to red? (for example those matched with /\s+$/ regexp).

5 Answers
5

Leave a Comment