A combination of vim and bash that I find useful
| 1 | set clipboard+=unnamedplus |
| 2 | let g:clipboard = { |
| 3 | \ 'name': 'win32yank-wsl', |
| 4 | \ 'copy': { |
| 5 | \ '+': 'win32yank.exe -i --crlf', |
| 6 | \ '*': 'win32yank.exe -i --crlf', |
| 7 | \ }, |
| 8 | \ 'paste': { |
| 9 | \ '+': 'win32yank.exe -o --lf', |
| 10 | \ '*': 'win32yank.exe -o --lf', |
| 11 | \ }, |
| 12 | \ 'cache_enabled': 0, |
| 13 | \ } |
| 14 | " WSL yank support |
| 15 | let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point |
| 16 | if executable(s:clip) |
| 17 | augroup WSLYank |
| 18 | autocmd! |
| 19 | autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif |
| 20 | augroup END |
| 21 | endif |