mskyaxl / wsl-terminal

Terminal emulator for Windows Subsystem for Linux (WSL)
MIT License
3.12k stars 158 forks source link

Windows Clipboard <-> Linux Clipboard #111

Closed dakom closed 6 years ago

dakom commented 6 years ago

Is it possible to somehow have them be the same thing?

Specifically, I want to be able to do this from vim in wsl-terminal: "+y and then paste the contents on the windows host side. Alternatively, copy something from a browser in the windows host side, and paste it into Vim via "+p

libratwo commented 6 years ago

like in real linux distribution(ubuntu etc.), default system vim is not support clipboard(vim --version)

solve: install gvim instead(need a lot dependencies)

Another solution

by passing buffer to clip.exe(windows cmd) **my env LANG=en_US.UTF-8

$ alias clip='/mnt/c/Windows/SystemWOW64/clip.exe' $ alias gclip='iconv -t ${LANG##*.} -f GBK|clip' # chinese need to trans encoding :w !clip :'b,'e w !gclip

dakom commented 6 years ago

I ended up solving it by switching to Neovim, which has a solution using w32yank :)

Works perfectly :D

Closing this for now - thanks!

libratwo commented 6 years ago

this would be great ;)