Diagnosing Vim Clipboard Failures on Linux: A Step‑by‑Step Guide
Diagnose and fix Vim clipboard failures on Linux with a step‑by‑step guide covering compile flags, helper utilities, environment variables, tmux, SSH, and Wayland.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Diagnose and fix Vim clipboard failures on Linux with a step‑by‑step guide covering compile flags, helper utilities, environment variables, tmux, SSH, and Wayland.
Use tmux copy mode with vi keys to search scrollback, select text across panes, and yank it to the tmux buffer or system clipboard — with config, verification, and SSH caveats.
Integration goal Achieve reliable, automatic synchronization between tmux's copy-mode buffer and the host operating system clipboard across macOS and Linux without manual intervention. Constraints and uncertainty tmux maintains an internal buffer distinct from the OS clipboard. On macOS the bridge relies on pbcopy / pbpaste invoked through default-command an
Goal Maintain consistent system-clipboard access via OSC 52 when a tmux session is reattached to different terminal emulators, some of which declare the Ms terminfo capability and others that do not. Constraints and uncertainty tmux 3.2–3.4 uses the static Ms entry in the attached terminal’s terminfo to decide whether to forward OSC 52 sequences when set-cli
Neovim 0.9 changed the clipboard subsystem so that the 'clipboard' option starts empty, requiring an explicit 'set clipboard=unnamedplus' to share the system clipboard. At the same time, OSC52‑based copying over SSH is disabled by default to prevent accidental data leakage. The project is still debating whether OSC52 should remain opt‑in, become opt‑out, or
Background Neovim can be built with both the +clipboard and +xterm_clipboard features. On Linux systems, the former typically maps to the X11 clipboard helper (e.g., xclip or xsel ), while the latter is intended for terminal‑based clipboards such as wl-clipboard on Wayland. The clipboard option accepts values like unnamed , unnamedplus , or a comma‑separated