How to do inline paste from system buffer in Vim?

Posted by yetapb on Stack Overflow See other posts from Stack Overflow or by yetapb
Published on 2010-06-14T20:11:42Z Indexed on 2010/06/14 21:12 UTC
Read the original article Hit count: 122

Filed under:

When pasting from the system buffer in a line like

foo( someVal , <cursor is here>, someVal3); 

If I use "*p I get

foo( someVal, , someVal3);
<pasted text>

If I use "*P I get

<pasted text>
foo( someVal, , someVal3);

but I want

foo( someVal, <pasted text>, someVal3 );

How can I get the result I want?

edit

If there is a newline in the buffer as @amardeep suspects, is there a way I can tell vim to ignore it?

© Stack Overflow or respective owner

Related posts about vim