title: How to correctly indent text when using `put` in Vim
body: <p>I'm having trouble when <code>putting</code> text in Vim. <br><br>Say I want to paste my <code>/* Comment */</code> line below the <code>$('table').append</code> line...</p>
  
  <pre><code>/* Comment */
  
  for (var i=1; i&lt;=lineLength ; i++) {
      $('table').append('&lt;tr&gt;&lt;/tr&gt;');
      for (var j=1; j&lt;=lineLength; j++) {
      $('table tr:nth-last-child(1)').append('&lt;td&gt;&lt;/td&gt;');
      }
  }
  </code></pre>
  
  <p>In most text editors, my workflow would be</p>
  
  <ol>
  <li>Select <code>/* Comment */</code>, hit cut.</li>
  <li>Move cursor to end of first line of code and hit return.</li>
  <li>Text editor auto-indents, and I just hit paste.</li>
  </ol>
  
  <p>i.e.</p>
  
  <pre><code>/* Comment */
  
  for (var i=1; i&lt;=lineLength ; i++) {
      $('table').append('&lt;tr&gt;&lt;/tr&gt;');
      | &lt;==Pipe is position of cursor before paste; pasted lines are inserted here.
      for (var j=1; j&lt;=lineLength; j++) {
      $('table tr:nth-last-child(1)').append('&lt;td&gt;&lt;/td&gt;');
      }
  }
  </code></pre>
  
  <p>But with vim, it seems like I have to do this:</p>
  
  <ol>
  <li>Move to <code>/* Comment */</code> line, hit <code>dd</code>.</li>
  <li>Move to <code>$('table').append</code> line, hit <code>p</code>.</li>
  </ol>
  
  <p>New code:</p>
  
  <pre><code>for (var i=1; i&lt;=lineLength ; i++) {
          $('table').append('&lt;tr&gt;&lt;/tr&gt;');
  /* Comment */. &lt;== Comment is not correctly indented.
          for (var j=1; j&lt;=lineLength; j++) {
          $('table tr:nth-last-child(1)').append('&lt;td&gt;&lt;/td&gt;');
          }
      }
  </code></pre>
  
  <ol start="3">
  <li>Manually fix incorrectly indented code.</li>
  </ol>
  
  <p>Vim auto-indents fine when I start a new line with <code>o</code>, so it seems like it should also handle <code>putting</code> onto a new line.... Is there a command that will let me <code>put</code> new lines of code with the correct indentation? </p>