Vim Copy to Clipboard Not Working
Workaround available Linux, macOS, WSL Updated October 21, 2026
Quick answer
Usually your Vim was built without clipboard support. Check vim --version for +clipboard, install a build that has it, then copy with "+y.
Most likely fix: Check whether your build supports the clipboard.
Symptoms
"+y or "*y does nothing, set clipboard=unnamedplus has no effect, yanked text cannot be pasted into the browser, or :echo has('clipboard') prints 0.
Why it happens
- Distro's default vim package is compiled with -clipboard
- Using y (unnamed register) instead of the "+ clipboard register
- Running on Wayland with a Vim older than 9.2 (no native Wayland clipboard)
- Inside SSH/tmux there is no access to the local clipboard
How to fix it
Try these in order — the most common fix is first.
1. Check whether your build supports the clipboard
- Run vim --version | grep clipboard
- +clipboard / +xterm_clipboard = supported; -clipboard = not supported
- Inside Vim, :echo has('clipboard') should print 1
2. Install a Vim build with clipboard support
- Debian/Ubuntu: sudo apt install vim-gtk3
- Arch: install gvim (it also provides terminal vim with +clipboard)
- Fedora: sudo dnf install vim-X11 and use vimx
- macOS: brew install vim
3. Use the right register
- Select text with v or V
- Press "+y to copy to the system clipboard
- Paste from the clipboard with "+p
4. Make y use the clipboard by default
- Add set clipboard=unnamedplus to ~/.vimrc
- Restart Vim; this only works once the build shows +clipboard
5. On Wayland, upgrade to Vim 9.2+
- Vim 9.2 added experimental Wayland clipboard support
- On older versions install wl-clipboard and pipe: :'<,'>w !wl-copy
This guide also covers
- vim copy to clipboard
- vim clipboard not working
- vim +y not working
- vim clipboard=unnamedplus not working
Still not working?
If Vim keeps failing, you're not alone. See every Vim problem users report or the alternatives people switch to.
Other Vim errors
- How to Exit Vim (Stuck in Vim)
- Vim E325: ATTENTION Found a Swap File
- Vim E212: Can't Open File for Writing
- Vim E37: No Write Since Last Change
- Vim Backspace Not Working in Insert Mode
- Vim Paste Indentation Messed Up (Staircase Effect)
- Vim Colors Wrong in tmux
- Why Is Vim So Slow? (Large Files & Long Lines)
- Vim Arrow Keys Insert A B C D
- Vim Requires Python 3 Support Error (YouCompleteMe)
- Vim Modeline Vulnerability CVE-2026-34982