Vim

如何在 vim-fugitive 外掛中更改 Gdiff 的配色方案?

  • March 9, 2017

我使用 vim-fugitive 外掛來檢查 git diff。突出顯示程式碼更改的配色方案並不適合我的日曬背景。我看不到更改 Gdif 著色方案的命令。誰能幫我改變配色方案?

從一些閒逛: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

有關更多範例,請參見onedark.vim招標.vim

引用自:https://unix.stackexchange.com/questions/342784