开发者

How to do inline paste from system buffer in Vim?

开发者 https://www.devze.com 2023-01-03 05:41 出处:网络
When pasting from the system buffer in a line like foo( someVal , <cursor is here>, someVal3); If I use \"*p I get

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

开发者_JAVA百科<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?


You can type <C-r>* in insert mode and then use <BS> to remove trailing newline.


Use capital P instead of lower case p in that command.


"*p or "+p works for me. Are you sure that's what you're actually typing?

0

精彩评论

暂无评论...
验证码 换一张
取 消