title: VIM syntax highlighting of html nested in yaml
body: <p>Given a <code>yaml</code> file that contains <code>html</code>, like this:</p>
  
  <pre><code>template        : |+ 
      &lt;div&gt;Hello, world&lt;/div&gt;
  </code></pre>
  
  <p>Is it possible in Vim (version 7.3.087) to highlight the html portion with <code>html</code> syntax highlighting?</p>
  
  <p>I found the post <a href="http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file" rel="noreferrer">Different syntax highlighting within regions of a file</a>, which seems to have exactly the concept I was looking for, but I cannot get it to work as expected with <code>yaml</code>. I'd expect to be able to do the following (as suggested in the link):</p>
  
  <pre><code>" .vimrc
  " include the code from the above link
  call TextEnableCodeSnip('html' ,'#{{{html' ,'#html}}}', 'SpecialComment')
  </code></pre>
  
  <p>Then have the <code>yaml</code> as, for example:</p>
  
  <pre><code> template        : |+  #{{{html
      &lt;div&gt;Hello, world&lt;/div&gt;
   #html}}}
  </code></pre>
  
  <p>Unfortunately this does not work as expected i.e. the <code>html</code> code remains entirely highlighted with <code>yaml</code>. I've also noted that with my configuration (MacVim 55), this doesn't work in text files either.</p>
  
  <p>I'd be grateful for your thoughts or suggestions, and thank you for reading.</p>