Skip to content

a command line tool in order for Git to highlight by character

License

Notifications You must be signed in to change notification settings

smagch/git-diff-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Diff Highlight

Git Diff Highlight is a command line tool in order for Git to highlight by character.

There are already great highlighters for Git such as diff-highlight. But it's sometimes hard to see differences when your text contains long paragraphs without line break. In such a case, highlighted areas are covered almost all of paragraph, so you can hardly discover differences in them:

Screen Shot with diff-highlight

With Git Diff Highlight, however, it shows every detail of differences because highlights are oriented by character:

Screen Shot with Git Diff Highlight

So, as you can see from the above images, Git Diff Highlight is meant not for programmers but for writers, who write in CJK languages — Chinese, Japanese, and Korean — and who don't follow programmer's aesthetic convention (80 characters line break rule.)

Installation

gdhighlight command is available.

$ go get github.com/smagch/git-diff-highlight/gdhighlight

Usage

$ git diff --color | gdhighlight

Testing

$ go test

TODO

  • add Color Config as diff-highlight do.
  • avoid panic().
  • GitHub Release to distribute binary, if some people find this package useful.

About

a command line tool in order for Git to highlight by character

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published