Answers:
颜色由以下四个突出显示组(:help hl-DiffAdd
)控制:
DiffAdd diff mode: Added line
DiffChange diff mode: Changed line
DiffDelete diff mode: Deleted line
DiffText diff mode: Changed text within a changed line
这些通常是由配色方案定义的,但是如果您希望整体配色,则可以~/.vimrc
在:colorscheme
命令后(在命令之后)自定义它们,而不必突出显示差异。只需使用重新定义:highlight
。这是我的个人自定义项(对于GVIM;对于终端,您需要ctermfg/bg=...
/以外的其他适当属性):
hi DiffAdd gui=none guifg=NONE guibg=#bada9f
hi DiffChange gui=none guifg=NONE guibg=#e5d5ac
hi DiffDelete gui=bold guifg=#ff8080 guibg=#ffb0b0
hi DiffText gui=none guifg=NONE guibg=#8cbee2
如果您要即时切换颜色方案,则需要通过以下方式重新调用这些:hi
命令:autocmd ColorScheme * hi ...