From 46565c2d6b8d50912b0eab929011fb31a72d9ad3 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Tue, 12 Jul 2022 17:22:24 +0200 Subject: [PATCH] vim:keys: Nvim does not replace `has('clipboard')` Neovim does not make `has('clipboard')` obsolete. It only simplifies clipboard support but `has('clipboard')` will still return `0` if no supported clipboard program is installed. See `:help clipboard` Nvim has no direct connection to the system clipboard. Instead it depends on a |provider| which transparently uses shell commands to communicate with the system clipboard or any other clipboard "backend". and `:help clipboard-tool` The presence of a working clipboard tool implicitly enables the '+' and '*' registers. Nvim looks for these clipboard tools, in order of priority: - |g:clipboard| - pbcopy, pbpaste (macOS) - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set) - xclip (if $DISPLAY is set) - xsel (if $DISPLAY is set) - lemonade (for SSH) https://github.com/pocke/lemonade - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/ - win32yank (Windows) - termux (via termux-clipboard-set, termux-clipboard-set) - tmux (if $TMUX is set) --- .config/vim/vimrc.d/40-keys.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 39982bc..d493a1d 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -25,7 +25,7 @@ else endif " Interact with the system clipboard -if (has('clipboard') || has('nvim')) +if (has('clipboard')) map y "+y map Y "+Y map d "+d