From 4c2d7bac0b563b46ee558f7cb1658520aedfce83 Mon Sep 17 00:00:00 2001 From: Xinqi Bao Date: Fri, 22 May 2020 23:40:58 -0400 Subject: [PATCH] vimrc: improve clipboard setting --- .vimrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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() -- 2.20.1