1

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?

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

1 Answer 1

0

https://stackoverflow.com/questions/11489428/how-to-make-vim-paste-from-and-copy-to-systems-clipboard

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

1
  • 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 :-) Feb 27 at 11:08

Your Answer

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

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