Search code examples
windows-subsystem-for-linuxneovim

How to efficiently yank to system clipboard in WSL2 neovim?


I've installed win32yank through chocolatey and changed clipboard setting in init.vim:

set clipboard=unnamedplus

Everything works however I notice that copy and paste operations now have very slight but noticeable delay. Is there any alternative way to copy to system clipboard? (I'm using neovim in WSL2 Ubuntu)


Solution

  • Just remove clipboard option. It's harmful and useless.

    What it essentially does, it prepends "quote-plus" to all yank/delete/put commands automatically. Instead of this, manually type "+ when you want to access system clipboard and don't when you don't.