unh*_*ler 43 vim syntax-highlighting colors
我有语法高亮,但注释设置为深蓝色.这对我来说很难在黑色终端上阅读.如何更改它以使注释变为绿色?
sth*_*sth 74
可能你只需要告诉vim你有一个黑暗的背景:
:set background=dark
Run Code Online (Sandbox Code Playgroud)
这应该将突出显示更改为更好的可读性.
Bri*_*new 12
看看syncolor.vim
.你会发现它/usr/share/vim/vim{version}/syntax/
.
摘抄:
" There are two sets of defaults: for a dark and a light background.
if &background == "dark"
SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE
SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE
SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE
Run Code Online (Sandbox Code Playgroud)
所以第一SynColor
行看起来很有意思.我承认我不知道你是否可以覆盖它,而不是更改此文件.
如果要在不更改背景的情况下更改注释的颜色,可以使用该highlight
命令.Vim文档:突出显示
例如, :hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold