aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/provider.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/provider.txt')
-rw-r--r--runtime/doc/provider.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index 9fd35f19c5..99ec84c625 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -236,11 +236,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()|.
+ *clipboard-wsl*
+For Windows WSL, try this g:clipboard definition:
+>
+ let g:clipboard = {
+ \ 'name': 'WslClipboard',
+ \ 'copy': {
+ \ '+': 'clip.exe',
+ \ '*': 'clip.exe',
+ \ },
+ \ 'paste': {
+ \ '+': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
+ \ '*': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
+ \ },
+ \ 'cache_enabled': 0,
+ \ }
+
==============================================================================
Paste *provider-paste* *paste*
"Paste" is a separate concept from |clipboard|: paste means "dump a bunch of
-text to the editor", whereas clipboard provides features like |quote-+| to get
+text to the editor", whereas clipboard provides features like |quote+| to get
and set the OS clipboard directly. For example, middle-click or CTRL-SHIFT-v
(macOS: CMD-v) in your terminal is "paste", not "clipboard": the terminal
application (Nvim) just gets a stream of text, it does not interact with the