简体   繁体   中英

Vim highlight specially plugin syntax

For example , i use this command to highlight standard Statement: hi Statement term=bold ctermfg=245 gui=bold guifg=#969896

But my plugin also change color,so i try to get syntax attritube

for example in c code

"if" or "while" is "cCondtional->Statement"

and my NERDTree menu is:

"NERDTreeCWD->Statement"

How can i highlight for "cCondtional->Statement" or "NERDTreeCWD->Statement"?

I try to set: hi NERDTreeCWD->Statement term=bold ctermfg=245 gui=bold guifg=#969896 But not working

NERDTreeCWD->Statement means that the NERDTreeCWD highlight group is linked to the default Statement group, via the :hi link NERDTreeCWD Statement command. If I understand you right, you want to change both independently, ie break the link. For that, you just need to redefine it:

hi NERDTreeCWD term=bold ctermfg=245 gui=bold guifg=#969896

You can put this into your ~/.vimrc ; (syntax and normal) plugins are supposed to use :hi default , which will not override your definitions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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