so-fancy / diff-so-fancy

Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
MIT License
17.37k stars 335 forks source link

enhancement with section header char for locating and control options about the ruler #491

Open charlie-wong opened 5 months ago

charlie-wong commented 5 months ago

More examples and details can be found in README.md

charlie-wong commented 5 months ago

Usage demo with https://github.com/noborus/ov

x

# The git configuration to use with this demo
[pager]
  show = "diff-so-fancy | ov -F --header 3"
  log  = "ov -F --section-delimiter '^commit' --section-header-num 3"
  diff = "diff-so-fancy | ov -F --section-delimiter '^◯' --section-header-num 1"

[color "diff"]
  context    = 243           # gray
  meta       = yellow   bold
  commit     = yellow   bold
  frag       = 205   reverse # pink
  func       = cyan  reverse
  old        = red      bold
  new        = green    bold
  whitespace = red  reverse

[color "diff-highlight"]
  oldNormal    = red    bold
  oldHighlight = blue   reverse
  newNormal    = green  bold
  newHighlight = blue   reverse