git_diff_highlight

package module
v0.0.0-...-9a3c2a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2018 License: MIT Imports: 7 Imported by: 0

README

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader(r io.Reader) io.Reader

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL