如何更改 vim-fugitive 插件中 Gdiff 的配色方案?

如何更改 vim-fugitive 插件中 Gdiff 的配色方案?

我使用 vim-fugitive 插件来检查 git diff。突出显示代码更改的配色方案与我的日光背景不相称。我看不到更改 Gdif 颜色方案的命令。谁能帮我改变配色方案?

答案1

从一些探索中: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.

然后,您必须将每个突出显示组设置为您喜欢的颜色。

hi DiffAdd gui=NONE guifg=green guibg=black

奥内达克.vim招标vim了解更多示例。

相关内容