title: How to insert variable number of spaces necessary to align textual columns in Vim?
body: <p>I’m a fan of Visual mode in Vim, as it allows to insert text before any given column.</p>
  <p>For example, insertion of spaces after the quotation leaders below:</p>
  <pre><code>&gt; one
  &gt; two
  &gt; three
  </code></pre>
  <p>can be done via <code>&lt;Ctrl-V&gt;jjI  &lt;Esc&gt;</code>:</p>
  <pre><code>&gt;   one
  &gt;   two
  &gt;   three
  </code></pre>
  <p>as follows:</p>
  <ol>
  <li>Start Visual mode with <kbd>Ctrl</kbd>-<kbd>V</kbd>.</li>
  <li>Extend visual selection with <code>jj</code>.</li>
  <li>Insert some spaces with <code>I__</code>.</li>
  <li>Propagate the change to all the lines of the block selection with <kbd>Esc</kbd>.</li>
  </ol>
  <p>Now I have a text file that needs some formatting. This is what it looks like:</p>
  <pre><code>start() -- xxx
  initialize() -- xxx
  go() -- xxx
  </code></pre>
  <p>Now I want to align part of this text to arrange it into columns like this:</p>
  <pre><code>start()       -- xxx
  initialize()  -- xxx
  go()          -- xxx
  </code></pre>
  <p>The problem I have is that I cannot insert a different amount of indentation into each line and merely indenting a fixed amount of spaces/tabs is insufficient.
  How can you do an indentation where all indented text will have to be aligned at the same column?</p>
  <h3>Update</h3>
  <p>I only figured out a rather verbose and unwieldy method:</p>
  <ol>
  <li>Find the string position to indent from: <code>\--</code>.</li>
  <li>Insert n (let's say 20) spaces before that: <code>20i &lt;Esc&gt;</code>.</li>
  <li>Delete a part of those spaces back to a certain column (let's say 15): <code>d|15</code>.</li>
  <li>Save those steps as a macro and repeat the macro as often as necessary.</li>
  </ol>
  <p>But this approach is very ugly, though!</p>