3 ms·
I've found it to be a colossal pain in the ass in WSL, since the emulated linux clipboard isn't synced with the windows clipboard. I have to :wq, cat the file,
by sullyj3 6y ago
I've found it to be a colossal pain in the ass in WSL, since the emulated linux clipboard isn't synced with the windows clipboard. I have to :wq, cat the file, and ctrl-ins to copy.
- aidenn0 6y agoThat's not vim specific though, right? If you ran e.g. vscode inside WSL you would have the exact same problem?
- sullyj3 6y agoI'm not sure about the specific instance of vscode. Since it's a gui app, I don't think you can run it inside of wsl. You can use a plugin to connect to wsl, but I don't think that's quite the same thing, and I wouldn't expect it would allow clipboard sharing. The general point is right though. This is an issue with any terminal program that either doesn't allow selection of text, or has a system for selection of text that's separate to that of the terminal emulator.
- Congeec 6y agoI used a tool called lamonade that let you access the clipboard of Windows via a socket server. https://github.com/lemonade-command/lemonade https://github.com/lemonade-command/lemonade
- nickjj 6y agoIf you set up VcXsrv (an X-server) then your clipboard will be shared between WSL and Windows and Vim will work as long as you have +clipboard support in your copy of Vim without doing anything extra. I made a video tutorial around setting it up at: https://nickjanetakis.com/blog/getting-copy-paste-to-work-in-wsl-with-tmux-and-terminal-vim https://nickjanetakis.com/blog/getting-copy-paste-to-work-in...
- maple3142 6y agoI used this(https://www.github.com/maple3142/dotfiles/tree/master/.vimrc https://www.github.com/maple3142/dotfiles/tree/master/.vimrc) to let you yank directly into Windows's clipboard. It was copied from a stackoverflow answer, but I don't remember where is it.