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)

romainl
  • 186,200
  • 21
  • 280
  • 313
hmukos
  • 47
  • 6

2 Answers2

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.

Matt
  • 13,674
  • 1
  • 18
  • 27
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).

b0nes
  • 103
  • 1
  • 7