No way to copy/paste into vim #97

Closed
organman91 opened this Issue May 14, 2014 · 12 comments

Projects

None yet

8 participants

@organman91

It's possible I'm doing it wrong, but right-clicking while at the prompt dumps the contents of the clipboard into the shell, but in vim does nothing.

@oysteinkrog

In my cygwin+vim setup I need to use the vim "paste from system command".
"*p
Basically * is the system clipboard register.
More info here:
http://vim.wikia.com/wiki/Accessing_the_system_clipboard

@tombujok
Contributor

*p works in babun, closing

@tombujok tombujok closed this May 14, 2014
@pgrm
pgrm commented Apr 24, 2015

just a comment for future references - I managed to copy it out of vim with "*Y and paste into another vim windows with "*P

@ihadanny

Guys, sorry, the "*p" doesn't copy from the windows clipboard, instead it uses some mysterious internal babun clipboard. Couldn't get it to work.
Right click is way more intuitive and works in vim both in cygwin AND when I ssh from babun to a linux box, and open VIM there :)
Can I please re-open this?

@oysteinkrog

I've fixed msys2 vim so that windows clipboard works, use msys2 instead of babun.

@ihadanny

seriously?! you mean uninstall babun and install msys2 for everything? or
do you mean there's some way to use msys2 vim from inside babun?
On Jun 15, 2015 6:03 PM, "Øystein Krog" notifications@github.com wrote:

I've fixed msys2 vim so that windows clipboard works, use msys2 instead of
babun.


Reply to this email directly or view it on GitHub
#97 (comment).

@oysteinkrog

Msys2 has lots of packages (use pacman to install them), so you can setup whatever system you want.
You can't use msys2 packages from inside babun as babun is not msys2.
Having said that.. I don't understand quite why the cygwin vim in babun2 does not handle windows clipboard.. it should be possible to get that working.
Msys2 itself is basically cygwin+mods+a really nice package manager.

@TheKas
TheKas commented Jun 16, 2015

Try it with the following parameters

echo "set mouse-=a" >> ~/.vimrc
@ihadanny

It works! small correction:

echo "set mouse-=a" >> ~/.vimrc

(without the trailing ~)

On 16 June 2015 at 14:56, Kaspar Janowsky notifications@github.com wrote:

Try it with the following parameters

echo "set mouse-=a" >> /.vimrc


Reply to this email directly or view it on GitHub
#97 (comment).

Sent from my androido

@ihadanny

opening a stackoverflow for this question, please answer here for
posterity:
http://stackoverflow.com/questions/30883413/babun-copy-paste-from-windows-clipboard-into-vim

On 17 June 2015 at 08:59, Ido Hadanny ido.hadanny@gmail.com wrote:

It works! small correction:

echo "set mouse-=a" >> ~/.vimrc

(without the trailing ~)

On 16 June 2015 at 14:56, Kaspar Janowsky notifications@github.com
wrote:

Try it with the following parameters

echo "set mouse-=a" >> /.vimrc


Reply to this email directly or view it on GitHub
#97 (comment).

Sent from my androido

Sent from my androido

@dragon788

Using "*p or "+p is pretty normal for those used to *nix systems (Linux and OSX). Mouse mode is definitely the best way to get right click pasting working. Sometimes you also have to edit the mintty settings to determine how the mouse will behave.

@avery20024
avery20024 commented Aug 7, 2016 edited

maybe you just need to add this in your $HOME/.vimrc file

set clipboard=unnamed

than you can just hit y to copy in your babun vim, and to your windows with system clipboard(ctrl+v).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment