To get this off the table now and avoid any confusion … This is for Linux running in Windows 10(ubunutu), also known as WSL. Its not the same as cygwin and windows or stand alone linux. It is it's own beast.
So please keep the above in mind before I am referenced with all the articles I have already read or comment that this has been asked before.
Does anyone know how to make the copy and paste work off of the windows clipboard OR the WSL Ubuntu Linux emulation? I am using set clipboard=unnamedplus
. It's not working, not matter what combinations I use like yy
, "+yy
, etc.
Yes, it's vim-gtk
with +xterm_clipboard
support.
Best Answer
(Edit: Oct 2020) For 2-way clipboard on
neovim
, I have been usingwin32yank
for several months with no issues. Putwin32yank.exe
somewhere in your path on Linux (anywhere should be fine), and add the following to yourinit.vim
.(Original answer) If you just want to yank from VIM to Windows, for WSL2 and Ubuntu 20.04, this answer on Reddit worked perfectly for me with standard VIM and standard WSL2 Ubuntu.
Put the following in your
.vimrc
(at the bottom, for example):