question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Yank etc. copy to clipboard

See original GitHub issue

Hi, When I do yank in VS Code, it would be nice to copy it to the clipboard. If I directly use neovim on the command line, yank does copy it to the clipboard as I have the following setting.

set clipboard+=unnamedplus

In the vscode-neovim setting, I’m pointing it to the init.vm which has the above setting.

Is there some setting I’m missing? Please let me know.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
David-Elsecommented, Aug 23, 2020

I can confirm that with set clipboard=unnamedplus in init.vim yanking from VS Code works with the clipboard.

I am using Linux Centos8 and I have installed xclip, this is VITAL for it to work in Linux when using Xorg. @asvetliakov You might want to add that to the README, took me a while to work that out. From the manual:

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)
7reactions
c3-pennsucommented, Nov 19, 2020

Seems to work for me once I add that line as well. However be aware of the files you put in, ~/.vimrc or ~/.nvimrc doesn’t work anymore it has to be ~/.config/nvim/init.vim

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I send just-yanked text to the clipboard?
I'm going to go ahead and infer from your use of the word “select”, that you yanked via visual mode. If that's the...
Read more >
Make Yank etc. copy to clipboard · Issue #298 - GitHub
Hi, When I do yank in VS Code, it would be nice to copy it to the clipboard. If I directly use neovim...
Read more >
How to make vim paste from (and copy to) system's clipboard?
Copy "+y Paste "+p Works just like yank and paste except you specify he registry before. – Banjocat. Oct 28, 2015 at 19:17....
Read more >
How do I copy a file to the clipboard in Linux? - nixCraft
Describes how to copy a file to the Linux clipboard and then paste it using the CLI or GUI Files manager by pressing...
Read more >
Copy and Paste in tmux | seanh.cc - Sean Hammond
If you use tmux's copy mode keyboard commands to select some text and then click Ctrl + c or y it'll copy it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found