From 9722bd7b1b4793fa00af0dc971ceabb075c46d37 Mon Sep 17 00:00:00 2001 From: Deveshi Dwivedi <120312681+deveshidwivedi@users.noreply.github.com> Date: Thu, 3 Apr 2025 18:44:08 +0530 Subject: feat(clipboard): g:clipboard="foo" forces the "foo" clipboard tool #33235 --- runtime/doc/news.txt | 2 ++ runtime/doc/provider.txt | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index eee39f81f5..72ab3373f7 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -138,6 +138,8 @@ OPTIONS • 'winborder' add bold style. +• |g:clipboard| accepts a string name to force any builtin clipboard tool. + PERFORMANCE • todo diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index 7a4cc0ee7d..4f7807f721 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -240,6 +240,27 @@ The "copy" function stores a list of lines and the register type. The "paste" function returns the clipboard as a `[lines, regtype]` list, where `lines` is a list of lines and `regtype` is a register type conforming to |setreg()|. +Nvim also supports setting g:clipboard to a string to use a builtin clipboard provider: + + - "tmux" - Use tmux clipboard + - "xclip" - Use xclip for X11 clipboard + - "xsel" - Use xsel for X11 clipboard + - "wl-copy" - Use Wayland clipboard with wl-copy/wl-paste + - "wayclip" - Use Wayland clipboard with waycopy/waypaste + - "lemonade" - Use lemonade clipboard (for SSH) + - "doitclient" - Use doitclient clipboard (for SSH) + - "win32yank" - Use win32yank clipboard (for Windows) + - "clip" - Use clip/powershell clipboard (for Windows) + - "putclip" - Use putclip/getclip clipboard (for Windows/Cygwin) + - "termux" - Use Termux clipboard + - "pbcopy" - Use macOS clipboard + - "osc52" - Use OSC 52 sequence + +Example: >vim + let g:clipboard = 'tmux' + +This is equivalent to using the full dictionary configuration for tmux shown above. + *clipboard-wsl* For Windows WSL, try this g:clipboard definition: >vim -- cgit