I have followed the advice in this post for coloring white space in git diff
s. However, I don't often use diffs, so this was helpful to me in something I do use often, git add -p
, or patch mode. As of now, git will show me when I add a whitespace error. That is, it will highlight it on the end of a line. (I can't replicate this with a code example here because of the highlighting.) But when I remove a whitespace error, it looks like this:
- def method_name
+ def method_name
Where there used to the a whitespace error on the end of the first line and it is deleted in the second. This isn't very helpful, because the lines look identical. So how can I get it to show the highlighting of a deleted whitespace error?
Note: I am using MacVim.
EDIT: The other issue is that if I try to git diff -R
(reverse), then it looks like I added a whitespace error instead of removing it, and that's confusing.