Thursday, May 19, 2016

CSS syntax in php.vim

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;

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: