diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 82e0953196..58d3d4550f 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -140,6 +140,18 @@ function! provider#clipboard#Executable() abort let s:copy['*'] = s:copy['+'] let s:paste['*'] = s:paste['+'] return 'win32yank' + elseif executable('putclip') && executable('getclip') + let s:copy['+'] = ['putclip'] + let s:paste['+'] = ['getclip'] + let s:copy['*'] = s:copy['+'] + let s:paste['*'] = s:paste['+'] + return 'putclip' + elseif executable('clip') && executable('powershell') + let s:copy['+'] = ['clip'] + let s:paste['+'] = ['powershell', '-NoProfile', '-NoLogo', '-Command', 'Get-Clipboard'] + let s:copy['*'] = s:copy['+'] + let s:paste['*'] = s:paste['+'] + return 'clip' elseif executable('termux-clipboard-set') let s:copy['+'] = ['termux-clipboard-set'] let s:paste['+'] = ['termux-clipboard-get'] diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index c43110790a..f1b0daee76 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -194,6 +194,8 @@ registers. Nvim looks for these clipboard tools, in order of priority: - lemonade (for SSH) https://github.com/pocke/lemonade - doitclient (for SSH) https://www.chiark.greenend.org.uk/~sgtatham/doit/ - win32yank (Windows) + - putclip, getclip (Windows) https://cygwin.com/packages/summary/cygutils.html + - clip, powershell (Windows) https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/clip - termux (via termux-clipboard-set, termux-clipboard-set) - tmux (if $TMUX is set)