]> git.sthu.org Git - vimconf.git/commitdiff
keymaps: Use + or * regs for clipboard
authorStefan Huber <shuber@sthu.org>
Thu, 6 Jan 2022 12:21:46 +0000 (13:21 +0100)
committerStefan Huber <shuber@sthu.org>
Thu, 6 Jan 2022 12:21:46 +0000 (13:21 +0100)
keymaps.vim

index 69799d1b8b9a9b5c7573191fec57337f9e9c9fa8..bf0597d1661f1c9ea0dc8d5fea16b0ca5f11915a 100644 (file)
@@ -2,10 +2,17 @@
 " Global settings
 
 if has('clipboard')
+    " Use + or * registers
+    if has('unnamedplus')
+        set clipboard+=unnamedplus
+    else
+        set clipboard+=unnamed
+    endif
+
     " Ordinary ctrl+{c,x,v} using system clipboard register +. We use autocmd to
     " override plugin keymaps.
-    autocmd VimEnter * vnoremap <C-c> "+y
-    autocmd VimEnter * vnoremap <C-x> "+x
+    "autocmd VimEnter * vnoremap <C-c> "+y
+    "autocmd VimEnter * vnoremap <C-x> "+x
     " Is performed by S+Ins
     "autocmd VimEnter * nnoremap <C-v> "+p
     "autocmd VimEnter * inoremap <C-v> <c-r>+