I have a number of JavaScript files where the strings are snippets of HTML to be inserted into the webpage. Vim performs syntax highlighting on the JavaScript, and highlights the quoted strings as such. It seems to go beyond highlighting, in fact: within a quote, vim does not match the <
that begins a tag with the >
that ends it when using %; it seems to assume things like brackets don't exist in string literals.
Is there a way to indicate to vim that string literals should be treated as code in a separate language?