Using Vim 7.4, with the following Perl code:
print <<"HTML";
<table>
<tr>
<td>I AM THE TABLE.</td>
</tr>
</table>
HTML
...I want the syntax highlighting to display as HTML. I tried adding the following code to ~/.vim/after/syntax/perl.vim:
" Load HTML syntax
syntax include @html syntax/html.vim
" Highlight HTML inside <<HTML heredocs
syntax region perlHereDocHTML
\ matchgroup=perlHereDocDelimiter
\ start=+<<\s*["']\=HTML["']\=+
\ end=+^HTML$+
\ contains=@html
\ keepend
But it is still not working. It is displayed as plain yellow text. How do I get it to highlight the HTML elements as if I were viewing a .html file?