0

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:

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.

2
  • 1
    :help clipboard – Matt Feb 20 at 14:55
  • I have read the clipboard help, but still don't understand how to make clipboard work. My environment is in Docker container, I have installed xclip, but still no effect, cannot use +, * registers. – niekas Feb 20 at 15:42
0

Linux does not provide any system clipboard. Therefore you can't make use of it.

See, for example, Access Unix Clipboard for explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.