title: Vim: paste before cursor in insert mode
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2861627/vim-paste-in-insert-mode">Vim - paste in insert mode?</a>  </p>
  </blockquote>
  
  
  
  <p>I have, among others, two mappings:</p>
  
  <pre><code>vnoremap &lt;C-X&gt; "+x
  inoremap &lt;C-V&gt; &lt;C-O&gt;"+P
  </code></pre>
  
  <p>Using that I can select and insert text like in any other editor, but one thing is weird: when the cursor is at the line end, text is being inserted before the last character, not after the last one as expected. Assuming the clipboard contains <code>x</code>. Cursor is at <code>|</code>. In Insert mode:</p>
  
  <pre><code>^|ab$   yields: ^x|ab$   expected: ^x|ab$
  ^a|b$           ^ax|b$             ^ax|b$
  ^ab|$           ^axb|$             ^abx|$
  </code></pre>
  
  <p>When I change the mapping to <code>&lt;C-O&gt;"+p</code> I have the same problem at line start, I guess this is due to the <code>&lt;C-O&gt;</code> which changes the cursor to a block cursor that can't be placed before start/after end.</p>
  
  <p>So: how can I insert text before the insert mode cursor, using <code>&lt;C-V&gt;</code>, without having to call a function that calls <code>p</code> or <code>P</code> depending on the position in the line, which would be the only thing I can think of?</p>