Different background color for multiple filetypes in vim
Posted
by
puk
on Super User
See other posts from Super User
or by puk
Published on 2012-03-14T13:36:05Z
Indexed on
2012/04/04
17:33 UTC
Read the original article
Hit count: 293
Is it possible to have different background colors in vim (ie. one light, one dark) when dealing with files with multiple filetypes (ie. :set ft=html.php
)? In PHP code with HTML embedded, it can be difficult to see one single PHP statement amongst dozens of HTML lines, see below. I'll settle for anything, be it different bg color, a marker in the margin, a second left margin (one vim plugin does this for marks), maybe highlighting the <?php
tag for example (although that's less than ideal)
EDIT: I don't think this is possible at the syntax level as the syntax appears to use a limited number of elements (String, Function, Identifier...). This is no doubt to allow for the easy integration with colorschemes. SyntaxAttr is a good plugin to demonstrate this. Put it over any part of the code and it will tell you what syntax group it belongs to.
© Super User or respective owner