irongit

A combination of vim and bash that I find useful

ghostshell/ghost.vim/clipboard.vimrc
21 lines701 B
1set clipboard+=unnamedplus
2let 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
15let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point
16if 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
21endif