CK vir
CK vir

Reputation: 287

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

Upvotes: 0

Views: 84

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172748

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, i.e. 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.

Upvotes: 1

Related Questions