如何更改vim缓冲区的颜色?

问题描述

我正在自定义vim colorscheme(它基于ci_dark主题),但是我不知道是什么为我的缓冲区名称设置了蓝色。蓝色表示缓冲区在拆分之一中可见,但未激活。 AFAIK,只有与此相关的颜色组在以下三个,但我必须缺少一些东西。我想改变蓝色。你能帮我吗?

谢谢!

enter image description here

call s:HL('TabLine',s:colors.none,s:colors.none)
call s:HL('TabLineFill',s:colors.none)
call s:HL('TabLineSel',s:colors.black,s:colors.red)   

解决方法

我通过阅读大量文档找到了答案。如果您将来遇到相同的问题,请允许我与您分享。

我发现选项卡的颜色是由我使用的插件设置的。该文档指出了它正在使用的突出显示组。这就是我得到奇怪组合的原因。在我的情况下,PmenuSel与TabLineSel不同,因此导致了颜色差异。

https://github.com/ap/vim-buftabline/blob/master/doc/buftabline.txt

The highlight groups and their default links are as follows:

    Custom group             Default link      Meaning
    *BufTabLineCurrent*        |TabLineSel|        Buffer shown in current window
    *BufTabLineActive*         |PmenuSel|          Buffer shown in other window
    *BufTabLineHidden*         |TabLine|           Buffer not currently visible
    *BufTabLineFill*           |TabLineFill|       Empty area

我正在使用的配色方案为ci_dark。我已经根据自己的喜好配置了它,因此我只添加了以下代码来解决此问题。

" BufTabLine
" ----------------------------------------------------
call s:HL('BufTabLineActive',s:colors.foreground,s:colors.background)    

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...