Forem

Alex Gonzalez Lacasa
Alex Gonzalez Lacasa

Posted on

2

VIM / NeoVim and the clipboard (in Linux)

First check is your vim installation is enabled to access to the system clipboard.

:checkhealth
Enter fullscreen mode Exit fullscreen mode

This show posible warnings like

Clipboard (optional)
- WARNING No clipboard tool found. Clipboard registers ("+ and "*) will not work.
  - ADVICE:
    - :help clipboard
Enter fullscreen mode Exit fullscreen mode

try to put in ~/.config/nvim/init.vim

set clipboard=unnamedplus
Enter fullscreen mode Exit fullscreen mode

If the clipboard still isn't working and your graphical environment uses Wayland, install:
wl-clipboard

sudo apt install wl-clipboard
Enter fullscreen mode Exit fullscreen mode

At least in my case the clipboard between applications already works.

And remember, in VISUAL mode
y for copy
p for paste

Top comments (1)

Collapse
 
saltaformajo profile image
Saltaformajo

I'm using different mappings for neovims clipboard and system clipboard, so when I delete something in neovim, I know that my system clipboard untouched and I can paste one thing or another, depending what I need.

github.com/coffebar/dotfiles/blob/...

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay