title: Vim: Use tabs for indentation, spaces for alignment with C source files
body: <p>Does anybody have her vim setup in a way that uses hard tabs as indentation characters, but does use spaces for alignment? The problem I have is that when starting a continuation line like in</p>
  
  <pre><code>if (condition1 &amp;&amp; (anotherlongcondition || /* &lt;-- Here I insert a newline */
  |-------|-------   whatever  /* some additional alignment added automatically */
  </code></pre>
  
  <p>, then <code>cin</code> (which is a must for me) adds some alignment just the way I prefer <strong>positionally</strong>, but this alignment is created using as much hard tabs as possible and filling the rest with spaces (as I tried to visualize).</p>
  
  <p>So, in short, <code>cin</code> doesn't really seem to distinguish between <strong>indentation</strong> and <strong>alignment</strong>. I'd really like that all the added alignment in the example above is spaces. This way the alignment would be preserved correctly when switching <code>ts</code> temporarily.</p>
  
  <p>To make it clear again, I'd like to be able to write the following code, never pressing <code>&lt;TAB&gt;</code> or <code>&lt;SPACE&gt;</code> in front of the first non-blank character in any line (and not doing any manual shifting or whatever):</p>
  
  <pre><code>void foo(int bar)
  {
  |-------somestatement;
  |-------if (somecondition &amp;&amp; (someothercondition ||
  |-------                      whatevercomesnext))
  |-------|-------dosomething;
  }
  </code></pre>
  
  <p>I have already tried out <code>ctab.vim</code>, but it focuses on <strong>editing</strong> an aligned line with soft tabs, which seems silly to me because manual alignment is a task which affords 1-step refinement and not tab-width-step refinement. I did not change the way <code>cin</code> uses mixed tabs and spaces for alignment.</p>
  
  <p>I have not managed to find any built-in way to accomplish that. Perhaps still, there is one? Anyway, I doubt that there's a plugin that does that. Although I admittedly don't vim-script myself and may not have enough experience, I must say that most plugins I tried out only messed up my editor configuration...</p>