On my Windows 10 box, when using git bash, I am able to righ-click on git bash window and choose paste to flush the contents of the Windows clipboard to my vi text buffer.

Now, when I ssh into a remote machine from this git bash, the vi there catches my right-click, so the Windows pop-up menu does not come up to allow pasting.

How can I paste now from the Windows clipboard?

  • Disable the mouse: set mouse= Commented Jun 2, 2022 at 9:53
  • have you tried shift+ins ?
    – xaa
    Commented Jun 3, 2022 at 9:04

1 Answer 1



tells me that

Be aware that copying/pasting from the system clipboard will not work if :echo has('clipboard') returns 0. In this case, vim is not compiled with the +clipboard feature and you'll have to install a different version or recompile it. Some linux distros supply a minimal vim installation by default, but if you install the vim-gtk or vim-gtk3 package you can get the extra features nonetheless.

To compile vim with clipboard, I have found

Compiling vim from source just enabling clipboard

  • If the answer solve your problem maybe could you accept it using the v button next to the arrow voting buttons. It allow the question to rest :-) Commented Feb 27, 2023 at 11:08

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.