CSS syntax in php.vim

23 views
Skip to first unread message

DwigtArmyOfChampions

unread,
May 19, 2016, 7:37:51 AM5/19/16
to vim_use
When I'm editing a php file and I'm defining a string I can do syntax highlighting if I enclose HTML code in a here-doc and I can do the same with Javascript code and SQL code.

Example:

$str = <<<JAVASCRIPT
var myvar = 0; // the "var" is highlighted per JavaScript syntax rules
JAVASCRIPT;

What do I need to add to make this work for CSS code too? Example:

$css = <<<CSS
/* This is all one solid boring color :( */
.pos {
color:green;
}
.neg {
color: red;
}
CSS;

Reply all
Reply to author
Forward
0 new messages