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?
--
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_use/ebd8e648-f223-4dbc-b3cb-a50320a9b634n%40googlegroups.com.