title: Vim: in C, highlight struct name as cType
body: <p>I want to set up Vim for highlighting <code>struct</code> names as C type, so, I've hacked a bit on syntax script:</p>
  
  <pre><code>syn match cType   "\v(struct\s+)@&lt;=[a-zA-Z0-9_]+"
  syn match cType   "\v(enum\s+)@&lt;=[a-zA-Z0-9_]+"
  </code></pre>
  
  <p>It works, but it slows down my vim really significantly! As I just type, Vim became much less-responsive on Intel Core2 Duo 2.53 GHz.</p>
  
  <p>I've commented out my additions, and now it works fast again.</p>
  
  <p>So, it seems, <code>\@&lt;=</code> regexp construct is too slow to be used in syntax script. I tried to match it together with <code>struct</code> itself:</p>
  
  <pre><code>syn match cType   "\vstruct\s+[a-zA-Z0-9_]+"
  </code></pre>
  
  <p>But it doesn't work. Is there some other way to do this?</p>