📌  相关文章
📜  vim wsl 复制到 windows 系统剪贴板 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:33.940000             🧑  作者: Mango

代码示例1
# if you want to paste from windows clipboard into vim
# while in Insert Mode press Shift+Ins and confirm paste

# to make vim yank to windows clipboard 
# put the following in your .vimrc
# *you don't need to yank to a specific register
" WSL yank support
let s:clip = '/mnt/c/Windows/System32/clip.exe'  " change this path according to your mount point
if executable(s:clip)
    augroup WSLYank
        autocmd!
        autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif
    augroup END
endif