簡體   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