Coloring white space in git-diff's output

后端 未结 4 1685
故里飘歌
故里飘歌 2020-11-27 10:17

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

4条回答
  •  执念已碎
    2020-11-27 10:46

    Use git diff --color | less -R. The -R makes the color control codes human-friendly.

    Then you can use less's regular expression search, e.g.

    /[[:space:]]+$
    

提交回复
热议问题