I have NVIM v0.4.3 installed on Debian 10. When I run:
:echo has('clipboard')
I get 0
, which means that this extension is not available. I cannot copy to OS clipboard using "+y
and "*y
commands.
How could I install or make this extension available?
Update :help clipboard
shows:
Clipboard integration
provider-clipboard 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".
To ALWAYS use the clipboard for ALL operations (instead of interacting with the '+' and/or '*' registers explicitly):
set clipboard+=unnamedplus
See 'clipboard' for details and options.
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)
- tmux (if $TMUX is set)
Which of these providers could work in Debian Docker container? It seems that only tmux
is suitable, however I have to start tmux
session to use it. I have tried xclip
, but probably $DISPLAY
is not set in the container and it does not work.
xclip
, but still no effect, cannot use +, * registers.:h clipboard-osc52
. For older versions these plugins could be used: github.com/ojroques/nvim-osc52 and github.com/ojroques/vim-oscyank