vim 学习日志(13) : vimdiff 配色
字段释义:
cterm
- sets the stylectermfg
- set the text colorctermbg
- set the highlightingDiffAdd
- line was addedDiffDelete
- line was removedDiffChange
- part of the line was changed (highlights the whole line)DiffText
- the exact part of the line that changed
颜色代码:
Below are the cterm-colors
, if you want to add your preferred color instead of the ones I used.
NR-16 NR-8 COLOR NAME
0 0 Black
1 4 DarkBlue
2 2 DarkGreen
3 6 DarkCyan
4 1 DarkRed
5 5 DarkMagenta
6 3 Brown, DarkYellow
7 7 LightGray, LightGrey, Gray, Grey
8 0* DarkGray, DarkGrey
9 4* Blue, LightBlue
10 2* Green, LightGreen
11 6* Cyan, LightCyan
12 1* Red, LightRed
13 5* Magenta, LightMagenta
14 3* Yellow, LightYellow
15 7* White
代码直接加到 用户根目录下,.vimrc 中 就可以了
先上个我的配色:
1 2 3 4 5 6 | if &diff hi DiffAdd cterm=bold ctermfg=12 guibg=LightBlue hi DiffDelete cterm=bold ctermfg=13 ctermbg=14 gui=bold guifg=blue guibg=LightCyan hi DiffChange cterm=bold ctermbg=green ctermfg=15 guibg=Magenta hi DiffText term=reverse cterm=bold ctermfg=9 gui=bold guibg=Red endif |
效果:
不喜欢绿色,可以这样:
1 2 3 4 5 6 | if &diff hi DiffAdd cterm=bold ctermfg=12 guibg=LightBlue hi DiffDelete cterm=bold ctermfg=13 ctermbg=14 gui=bold guifg=blue guibg=LightCyan hi DiffChange cterm=bold ctermbg=Magenta ctermfg=15 guibg=Magenta hi DiffText term=reverse cterm=bold ctermfg=9 gui=bold guibg=Red endif |
效果:
稍后整理,具体配色是如何调的。。。
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步