How to make inline paste from a system buffer in Vim?

When pasting from a system buffer in a type string

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?

change

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

+6
vim
source share
3 answers

You can enter <Cr>* in insert mode, and then use <BS> to delete the ending newline.

+5
source share

Use the P command instead of the lowercase p in this command.

+2
source share

"*p or "+p works for me. Are you sure you are actually printing?

0
source share

All Articles