Jul 10: VIM syntax highlighting for PHP heredocs containing CSS
Many people are aware of the power of PHP heredocs, in that they allow variable expansion without the escape-hell of " and ' quotes having significance. The only downsides are the strictness of the EOF marker locations and that constants cannot be used in heredocs.
I always used to be bothered by the fact that my code in heredocs was all-black, and not highlighted at all. I now realise that this is due to the fact that to get the highlighting you want, you need to choose your markers correctly. See this comment for details. No more drab EOF. I can assure you that the syntax highlighting allows for longer markers, like HTMLform and so on.
So this method works for HTML, JavaScript and SQL. Great. But what if you, like me, create "dynamic stylesheets"? Here's an example:
Read More
I always used to be bothered by the fact that my code in heredocs was all-black, and not highlighted at all. I now realise that this is due to the fact that to get the highlighting you want, you need to choose your markers correctly. See this comment for details. No more drab EOF. I can assure you that the syntax highlighting allows for longer markers, like HTMLform and so on.
So this method works for HTML, JavaScript and SQL. Great. But what if you, like me, create "dynamic stylesheets"? Here's an example:
Read More
« previous page
(Page 1 of 1, totaling 1 entries)
next page »

