繁体   English   中英

vimrc设置高亮模式

[英]vimrc set highlight mode

我的.vimrc文件中包含以下内容:

version 6.0

" set highlight mode
set highlight=8b,@-,db,es,lb,mb,M-,nu,rs,sr,tb,vr,ws

大部分是从这里借来的。

我不明白这行的作用:

set highlight=8b,@-,db,es,lb,mb,M-,nu,rs,sr,tb,vr,ws

我花了几个小时试图弄清楚为什么我的行号不符合我的颜色方案,并将其追溯到这一行。 如果我从列表中删除nu ,则我的行号将开始正确突出显示。 我找不到任何文档解释任何两个字符模式的含义。 更改或删除其他选项似乎并不会影响任何明显的事情。

有人可以给我指出一些说明这里发生什么情况的文档吗?

编辑:我读了Vim的:help高亮页面,找不到任何解释此语法的内容。 如果在帮助中存在,有人可以告诉我如何找到相关部分吗?

就像评论中一样, :help 'highlight'有您的答案。 每个参数是一对类型模式参数。

您列出的每个对的含义是:

8b special characters for :map (eg <cr>) are bold
@- ~ characters after eof, along with some other special symbols, are not formatted
db directories are bold
es errors are standout
lb last search results are bold
mb more-prompt (when messages take up more than the screen) is bold
M- current mode (eg insert) is not formatted
nu line number is underlined
rs enter and y/n prompts are standout
sr status line of current window is reverse
tb titles of options (eg from :set all) are bold
vr visual highlighting is reverse
ws warnings are standout

如果要自定义这些选项,则这是mode参数(第二个字符)的每个可能值的含义:

r   reverse
i   italic
b   bold
s   standout
u   underline
c   undercurl
n   no highlighting
-   no highlighting
:   use a highlight group

我不会详细介绍所有可能的类型参数(第一个字符),但是您可以在前面提到的帮助页面中找到它们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM