I just Django html so I have the normal html tags as well as the if, else, endif, for and endfor statements. I use a customized version of the colorscheme called slate. There is a line in the colorscheme which says this:
:hi Statement guifg=CornflowerBlue ctermfg=lightblue
and it turns all html tags and if, else, endif, for and endfor statements to a cornflowerBlue color. How do I make the color of the if, else, endif, for and endfor statements a different color than the html tags?
Best Answer
The corresponding highlight links are these:
from
syntax/django.vim
:from
syntax/html.vim
:You see that both end up linking to the
Statement
group defined in your colorscheme, and colored blue in your case.To change those, pick highlight groups from your colorscheme (e.g.
Special
andConstant
), and redefine the links in your~/.vimrc
:The hidden magic of the
HiLink
command (which is just a wrapper for:hi def link
) is that when a link exists (like with the above two lines), thedef
ault won't be activated.Alternatively, you could also define new colors on the spot (but it's best centralized in a colorscheme):