Re:Switching from Vim to Intellij
by sullyj3 on Thursday November 05, 2020 @09:43AM
(#24998651)
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.
[ Parent
| on HN ]
I used this(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.
If 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...
That's not vim specific though, right? If you ran e.g. vscode inside WSL you would have the exact same problem?
I'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.
I used a tool called lamonade that let you access the clipboard of Windows via a socket server.