How to change the coloring scheme of Gdiff in vim-fugitive plugin

colorsdiff()vim

I use the vim-fugitive plugin to check git diff. The coloring scheme to highlight the code changes does not compliment my solarized background. I am not able to see the commands to change the coloring scheme of Gdif. Could anyone help me changing the coloring scheme?

Best Answer

From some poking around in :h diff

|hl-DiffAdd|    DiffAdd     Added (inserted) lines.  These lines exist in
                this buffer but not in another.
|hl-DiffChange| DiffChange  Changed lines.
|hl-DiffText|   DiffText    Changed text inside a Changed line.  Vim
                finds the first character that is different,
                and the last character that is different
                (searching from the end of the line).  The
                text in between is highlighted.  This means
                that parts in the middle that are still the
                same are highlighted anyway.  Only "iwhite" of
                'diffopt' is used here.
|hl-DiffDelete| DiffDelete  Deleted lines.  Also called filler lines,
                because they don't really exist in this
                buffer.

Then you have to set each of those highlight groups to your preferable color.

hi DiffAdd gui=NONE guifg=green guibg=black

See onedark.vim and tender.vim for more examples.

Related Question