From 20758ef15faf8a2180f3bd59ed2b6a35f1688aca Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Wed, 1 Mar 2023 22:00:47 -0500 Subject: [PATCH] . --- .vimrc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index 9c06536..c8f44bf 100644 --- a/.vimrc +++ b/.vimrc @@ -298,10 +298,18 @@ else set clipboard=unnamedplus if g:isWSL - augroup Yank - autocmd! - autocmd TextYankPost * :call system('/mnt/c/windows/system32/clip.exe ',@") - augroup END + " will cause freezing of vim, not sure why + " function CopyToWin(timer) + " try + " call system('/mnt/c/windows/system32/clip.exe ',@") + " catch + " endtry + " endfunction + " augroup Yank + " autocmd! + " " autocmd TextYankPost * :call system('/mnt/c/windows/system32/clip.exe ',@") + " autocmd TextYankPost * let _ = timer_start(0, 'CopyToWin', { 'repeat': 1 }) + " augroup END endif endif