Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'd use <code>:%s/^/ /</code></p> <p>You could also specify a range of lines <code>:10,15s/^/ /</code></p> <p>Or a relative range <code>:.,+5s/^/ /</code></p> <p>Or use regular expressions for the locations <code>:/A/,/D/&gt;</code>.</p> <p>For copying code to paste on SO, I usually use sed from the terminal <code>sed 's/^/ /' filename</code></p> <hr> <h1>Shortcut</h1> <p><a href="https://stackoverflow.com/questions/15529510/something-awesome-just-happened-what-did-i-do">I just learned</a> a new trick for this. You enter visual mode <code>v</code>, select the region (<em>with regular movement commands</em>), then hit <code>:</code> which gives you this:</p> <pre><code>:'&lt;,'&gt; </code></pre> <p>ready for you to type just the <em>command</em> part of the above commands, the marks <code>'&lt;</code> and <code>'&gt;</code> being automatically set to the bounds of the visual selection.</p> <p>To select and indent the current paragraph:</p> <pre><code>vip&gt; </code></pre> <p>or </p> <pre><code>vip:&gt; </code></pre> <p>followed by <kbd>enter</kbd>.</p> <p><em>Edit:</em></p> <p>As requested in the comments, you can also add spaces to the middle of a line using a regex quantifier <code>\{n}</code> on the <em>any</em> meta-character <code>.</code>.</p> <pre><code>:%s/^.\{14}/&amp; / </code></pre> <p>This adds a space 14 chars from the left on each line. Of course <code>%</code> could be replaced by any of the above options for specifying the range of an <strong>ex</strong> command.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload