so-fancy / diff-so-fancy

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

Can I use it with vim-fugitive? #463

Closed vitaly-zdanevich closed 1 year ago

vitaly-zdanevich commented 1 year ago

I tried:

[pager]
    diff = diff-so-fancy | less --tabs=4 --RAW-CONTROL-CHARS --quit-if-one-screen

and got raw git diff, without colors :(

diff-so-fancy works for me in my shell, for git diff. I use Kitty on Gentoo. My git config is here.

$ git version
git version 2.39.2

See related issue https://github.com/tpope/vim-fugitive/issues/2132

OJFord commented 1 year ago

Works fine for me with:

$git config pager.diff
diff-so-fancy | less --tabs=4 -RFX

or as plain diff-so-fancy.

It also seems to work with your less args for me, though what I assume is the effect of --RAW-CONTROL-CHARS does not look like you screenshots in the linked issue (a Kitty thing?).

Anyway, closing, because it doesn't seem to be a diff-so-fancy issue, nor vim-fugitive. Try without the pipe to less, and with that works, experiment with those args.

vitaly-zdanevich commented 1 year ago

diff-so-fancy | less --tabs=4 -RFX

Tried this: again raw diff with no colors :(

image

or as plain diff-so-fancy

With this too.

Also tried another terminal: Alacritty.

OJFord commented 1 year ago

Well it works for me in all three configurations with:

alacritty 0.11.0 (8dbaa0bb)

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 21 2023 18:10:20)
Included patches: 1-1337

fugitive @ b73a8e97de95d26280082abb7f51465a3d3b239e

dsf 1.4.3

it's something about your environment.