diff --git a/vimrc b/vimrc index 8e1ead0..fc4685c 100644 --- a/vimrc +++ b/vimrc @@ -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 ===