From: Stefan Huber Date: Thu, 6 Jan 2022 12:21:46 +0000 (+0100) Subject: keymaps: Use + or * regs for clipboard X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=1526f4626f30cb24af4bee1ea94656295f423b21;p=vimconf.git keymaps: Use + or * regs for clipboard --- 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 +