title: Wrap long lines in Vim?
body: <p>I've noticed that <kbd>gq</kbd> does not work when I paste in a long line. For example, with a <code>textwidth=72</code> and <code>formatoptions=tcroqbnl</code>, gq refuses to wrap this (in insert mode, I pasted the entire label contents, and then exited insert mode with <kbd>ESC</kbd>):</p>
  
  <pre><code>&lt;label for="contact_reason_1"&gt;To get assistance with or to confirm a tire replacement recommendation&lt;/label&gt;
  </code></pre>
  
  <p>If I add a line break in (after "to", for example), it'll wrap then. The funny thing is if I join the line back together, it'll happily wrap it again. So VIM seems to somehow be remembering "oh, this is one paste, don't wrap it".</p>
  
  <p>How do I turn that feature off? I'd like gq in command mode to <em>always</em> work. Taking <code>l</code> out of <code>formatoptions</code> did not seem to help (and it shouldn't, this isn't insert mode).</p>
  
  <hr>
  
  <h1>clarification</h1>
  
  <p>Yes, I'm using a motion command, in particular, <kbd>gq&lt;Right&gt;</kbd>. <code>formatexpr</code> and <code>formatprog</code> are both unset. If it matters, this is in gvim on Debian GNU/Linux, vim version 7.2p284.</p>
  
  <h1>steps to reproduce</h1>
  
  <ol>
  <li>Pop up gvim on an open file.</li>
  <li>Press <kbd>i</kbd> to get into insert mode, then type <code>This is a long line. A long line. But not wrappable yet. Or yet. Soon.</code></li>
  <li>Press <kbd>ESC</kbd>, then <kbd>I</kbd>. Type <code>Now putting text in front of the long line.</code> <em>note: there is a space after the final period, can't get SO to show it, except when this note is here. FUN.</em></li>
  <li>Press <kbd>ESC</kbd>, then <kbd>A</kbd>. Type <code>And some after.</code> <em>note: space before the And, same SO problem.</em></li>
  <li>Press <kbd>ESC</kbd> one last time. Now try <kbd>gq&lt;Left&gt;</kbd>, note it only wraps <code>And some after.</code>; I can't get vim to wrap the rest of the line (without going into insert mode and doing a line break by hand, then it works).</li>
  </ol>
  
  <p>Fixing this state is doable; putting a newline after "now" and then hitting undo makes line wrap work again. WTF.</p>