title: Limit vim syntax highlighting to diff
body: <p>I am making changes to an existing C code. If I just want to check my changes, I can easily use <code>vimdiff</code> for that, with old &amp; modified files.</p>
  
  <p>What I want is to limit some syntax highlighting to just the <code>diff</code> part.</p>
  
  <p>Particularly I need to highlight TABS, but only those TABS contained within <code>DiffAdd</code> &amp; <code>DiffChange</code> sections/regions.</p>
  
  <p><strong>What I tried</strong>:</p>
  
  <pre><code>syntax region TESTRGN start="TESTRGN_START" end="TESTRGN_END"
  highlight TESTRGN ctermbg=lightgreen guibg=lightgreen
  
  syntax match LeadingTabsInRegion display contained containedin=TESTRGN /^\( *\t\+\)\+/
  highlight LeadingTabsInRegion ctermbg=darkred guibg=darkred
  </code></pre>
  
  <p>Above snippet highlights the leading TABS within <code>TESTRGN</code> &amp; tabs in remaining file remain un-highlighted.</p>
  
  <p>However, if I change TESTRGN to DiffAdd in the <code>syntax match</code> line, it does not work as I expected.</p>
  
  <p>My understanding is that <code>DiffAdd</code> is not a region defined using <code>syntax region ...</code> &amp; hence <code>containedin=DiffAdd</code> does not work.</p>
  
  <p>So is there any method/work-around for doing what I am trying to do?</p>