From: Xinqi Bao Date: Sat, 23 May 2020 03:40:58 +0000 (-0400) Subject: vimrc: improve clipboard setting X-Git-Url: https://git.xinqibao.xyz/dotfiles.git/commitdiff_plain/4c2d7bac0b563b46ee558f7cb1658520aedfce83 vimrc: improve clipboard setting --- diff --git a/.vimrc b/.vimrc index c949e2c..1b4aaa8 100644 --- a/.vimrc +++ b/.vimrc @@ -36,8 +36,13 @@ set tags=tags~;,tags~ "setting gf (go file) path set path+=/usr/include/c++/*,include;,includes;,lib; -" Using "+ register for all the yank and paste in vim -set clipboard=unnamedplus +" Writes to the unnamed register also writes to the * and + registers. This +" makes it easy to interact with the system clipboard +if has ('unnamedplus') + set clipboard=unnamedplus +else + set clipboard=unnamed +endif call plug#begin()