#author("2022-01-29T03:58:52+09:00","default:ryuichi","ryuichi")
* WSL上のVimのyankをWindowsと共有する [#i887c6d4]

*** .vimrc [#u6c6e0cd]

 " WSL clipboard
 if !empty($WSL_DISTRO_NAME)
   let s:clip = '/mnt/c/Windows/System32/clip.exe'
   if executable(s:clip)
     augroup WSLYank
       autocmd!
       autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif
     augroup END
   endif
 endif

** 参考 [#ae8b43a6]

https://superuser.com/questions/1291425/windows-subsystem-linux-make-vim-use-the-clipboard

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS