1

For example:

enter image description here

mode: Visual-block.

In Gvim:

enter image description here

Now, I want to paste the system clipboard, say "4", to the position, I tried "p", now it becomes (that's not what I want!):

enter image description here

In Gvim:

enter image description here

I want:

enter image description here

I think a lot and tried a lot, no way! Can anyone help me? Thanks!

PS: I know I can input "4" mannualy, but if the content is a long string, copy and paste is more rational obviously

4
  • 2
    Welcome to Vi and Vim SE. Please try to share text as text whenever possible. Since you used screenshots, you might as well add one which shows your actual visual selection. I cannot reproduce your problem. BTW, "+p pastes from system clipboard.
    – Friedrich
    Jan 17 at 16:21
  • Your screenshots don't match your problem description at all. Given your screenshots, the outcome you get is the only possible outcome of what you are doing.
    – romainl
    Jan 18 at 6:26
  • I don't understand the question. According to your first image, you have spaces between the numbers. But according to the other images, you lost those spaces? That cannot happen during pasting. Also, assuming you have only a single 4 in your clipboard (and in particular no linebreaks). If I use "+p while visual-block selecting a single column, that column will be replaced by the 4 and that is the default behaviour. Jan 18 at 7:14
  • Do you still have something open in your question? How can we help you further? Otherwise maybe could you accept one of the solutions using the v button next to the arrow voting buttons. It allow the question to rest :-) Jan 20 at 10:54

1 Answer 1

1

I would do: ICtrl R+Esc

Where + is the system clipboard. Replace with another register if you want to paste from it.

Or, if you were on Windows ICtrl R*Esc would also work.

2
  • 1
    According to the title, OP wants to post from system clipboard. I<C-R>+<Esc> should do the trick.
    – Friedrich
    Jan 18 at 18:08
  • 1
    Thanks @Friedrich, I have modified the solution :-) Jan 18 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.