Attempt to fix clipboard reset on vim exit

This commit is contained in:
Talia 2018-12-11 09:19:51 +01:00
parent 3ccfc40348
commit 0c7f600d01
1 changed files with 8 additions and 0 deletions

8
vimrc
View File

@ -103,8 +103,16 @@ set timeoutlen=1200
if has('unnamedplus') " Allow copying to and from OS clipboard
set clipboard=unnamedplus
else
if has("unix")
autocmd VimLeave * call system("xsel -ib", getreg('*'))
end
set clipboard=unnamed
end
if has("unix")
autocmd VimLeave * call system(
\ 'echo -n '.shellescape(getreg('+')).' | xclip -selection clipboard'
\ )
end
" === GENERAL UTILITIES ===