Skip to content

Clipboard support in Wayland #5157

@mb720

Description

@mb720

Hi and thanks a lot for Vim!

Vim 8.1 does not support yanking and pasting to the system clipboard when run on Wayland (using Sway, for example).

There are workarounds like adding this to .vimrc:

xnoremap "+y y:call system("wl-copy", @")<cr>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p

This requires wl-clipboard to be installed.

Are there any plans to have clipboard support built into Vim?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions