I'm using Sublime Text with the Pastels on Dark theme. My language of choice is PHP. How can I get HTML syntax highlighting inside PHP strings & heredoc syntax?
Wanted to add this as a comment to Ol' Reliable's answer but I am not allowed yet.
Whilst coding outside and then copying in can be a hassle, for people/editors without syntax highlighting in heredoc, an easy workaround is to temporarily add a closing php tag to the heredoc opening tag:
<?php $myHtmlCode = <<<HTML?> <h1>I am Highlighted</h1> <p>Remove the closing php tag above to finish editing</p> HTML; ?>