0

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)

2 Answers 2

1

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.

0

I've expanded on Matt's feedback and put this in my vimrc:

let mapleader=" "
noremap <Leader>y "+y
noremap <Leader>p "+p
noremap <Leader>d "+d

Select a block of text, press and then either y/p/d for yanking, pasting and deleting lines into the system buffer. It automagically seems to work with win32yank.exe (which is in my PATH in WSL2).

Not the answer you're looking for? Browse other questions tagged or ask your own question.