Reputation: 4483
right-clicking while at the prompt dumps the contents of the clipboard into the shell, but in vim
it just switches to VISUAL mode and does nothing.
How do I workaround this?
https://github.com/babun/babun/issues/97
Upvotes: 21
Views: 15475
Reputation: 9
UPDATE: If its just a couple lines, ctrl c whatever you want to paste go to vim editor and just right click with your mouse where your arrow is at; this will paste everything. It is a faster approach, however everything will be paste as a comment.
I had tried other things before, but this is the only way it worked for me.
For Window users and beginners like me:
To get out from Insert(paste) mode:
Hope this helps!
Upvotes: 0
Reputation: 9799
Adding to the various other solutions: if you're getting the --visual--
mode when right-clicking into vim (babun) when trying to paste from the clipboard, you may try to paste by using the following (in "esc" edit mode): "*p
That is: keep holding shift
down to type double-quote ("
) followed by *
, then type a lower-case p
Upvotes: 6
Reputation: 584
Running the following command worked for me. Essentially just adding to your vimrc.
echo "set mouse-=a" >> ~/.vimrc
Upvotes: 15
Reputation: 3360
There are several variants how to run vim under MS Windows. Let assume you run console vim (not gvim) under cygwin.
The option mouse controls the vim mouse behavior. When you set the option :set mouse=
then right click pastes the windows clipboard to vim. When you set the option to set mouse=a
vim tries to interpret the mouse click somehow in all modes and it is a switch to visual mode when vim is in normal or insert mode.
See :help mouse
for details.
Upvotes: 2