From 1526f4626f30cb24af4bee1ea94656295f423b21 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Thu, 6 Jan 2022 13:21:46 +0100 Subject: [PATCH] keymaps: Use + or * regs for clipboard --- keymaps.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/keymaps.vim b/keymaps.vim index 69799d1..bf0597d 100644 --- a/keymaps.vim +++ b/keymaps.vim @@ -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 "+y - autocmd VimEnter * vnoremap "+x + "autocmd VimEnter * vnoremap "+y + "autocmd VimEnter * vnoremap "+x " Is performed by S+Ins "autocmd VimEnter * nnoremap "+p "autocmd VimEnter * inoremap + -- 2.39.5