Commit: runtime(doc): Add clipboard provider example for WSL
Christian Brabandt <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
runtime(doc): Add clipboard provider example for WSL Commit: https://github.com/vim/vim/commit/1d14eea969cc3f962bed78ab75b48064fc6c5fc0 Author: Mao-Yining <[email protected]> Date: Mon Aug 17 21:24:35 2026 +0000 runtime(doc): Add clipboard provider example for WSL Referencing mattn/vim-wslclip. Signed-off-by: Mao-Yining <[email protected]> Signed-off-by: Foxe Chen <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index d2b5bb478..cedb60d28 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.2. Last change: 2026 Aug 16 +*eval.txt* For Vim version 9.2. Last change: 2026 Aug 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5442,4 +5442,19 @@ Below is a sample script that makes use of the clipboard provider feature: >vim \ } set clipmethod^=test < + *clipboard-providers-wsl* +For Windows WSL, try this script: >vim9 + vim9script + + var Copy = (_, _, lines: list<string>) => system('wl-copy', lines) + var Paste = (_) => ('', systemlist('wl-paste --no-newline') + ->map((_, v) => v->trim(" ", 2))) + + v:clipproviders["wslclip"] = { + available: () => executable('wl-copy') && executable('wl-paste'), + copy: { "*": Copy, "+": Copy }, + paste: { "*": Paste, "+": Paste } + } + set clipmethod^=wslclip + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tags b/runtime/doc/tags index 92279726b..41e7a1072 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6752,6 +6752,7 @@ clipboard-providers-no-clipboard eval.txt /*clipboard-providers-no-clipboard* clipboard-providers-paste eval.txt /*clipboard-providers-paste* clipboard-providers-plus eval.txt /*clipboard-providers-plus* clipboard-providers-textlock eval.txt /*clipboard-providers-textlock* +clipboard-providers-wsl eval.txt /*clipboard-providers-wsl* clipboard-unnamed options.txt /*clipboard-unnamed* clipboard-unnamedplus options.txt /*clipboard-unnamedplus* clojure-indent indent.txt /*clojure-indent* -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1ww4uE-0096Tx-BL%40256bit.org.