本文介绍了Vim配置行号着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法配置用于行编号的颜色(如::set nu )在Vim。大多数平台上的默认值似乎是黄色的(这也用于一些突出显示的标记)。我会喜欢颜色的行号变暗灰色; #555 附近的某处。

I'm looking for a way to configure the color used for line numbering (as in: :set nu) in Vim. The default on most platforms seems to be yellow (which is also used for some highlighted tokens). I would like to color the line numbers a dim gray; somewhere in the vicinity of #555. I'm not picky though, any subdued color would be acceptable.

推荐答案

尝试:

help hl-LineNr

通过:

help 'number'

这是获取'number'选项而不是:number 命令。

which is the way to get help on the 'number' option, instead of the :number command.

实际更改显示的颜色:

:highlight LineNr ctermfg=grey

这将改变字符终端上LineNr的前景色到灰色。如果您使用gVim,您可以:

This would change the foreground colour for LineNr on a character terminal to grey. If you are using gVim, you can:

:highlight LineNr guifg=#050505

这篇关于Vim配置行号着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 00:36