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. 1. Check whether your build supports the clipboard

    1. Run vim --version | grep clipboard
    2. +clipboard / +xterm_clipboard = supported; -clipboard = not supported
    3. Inside Vim, :echo has('clipboard') should print 1
  2. 2. Install a Vim build with clipboard support

    1. Debian/Ubuntu: sudo apt install vim-gtk3
    2. Arch: install gvim (it also provides terminal vim with +clipboard)
    3. Fedora: sudo dnf install vim-X11 and use vimx
    4. macOS: brew install vim
  3. 3. Use the right register

    1. Select text with v or V
    2. Press "+y to copy to the system clipboard
    3. Paste from the clipboard with "+p
  4. 4. Make y use the clipboard by default

    1. Add set clipboard=unnamedplus to ~/.vimrc
    2. Restart Vim; this only works once the build shows +clipboard
  5. 5. On Wayland, upgrade to Vim 9.2+

    1. Vim 9.2 added experimental Wayland clipboard support
    2. 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