title: How can I autoformat/indent C code in vim?
body: <p>When I copy code from another file, the formatting is messed up, like this:</p>
  
  <pre><code>fun()
  {
  for(...)
  {
  for(...)
  {
  if(...)
  {
  }
  }
  }
  }
  </code></pre>
  
  <p>How can I autoformat this code in vim?</p>