Skip to content

Instantly share code, notes, and snippets.

@yavorski
Created December 22, 2020 13:01
Show Gist options
  • Save yavorski/30bc76759cfac9aaceb16c9568bdeae9 to your computer and use it in GitHub Desktop.
Save yavorski/30bc76759cfac9aaceb16c9568bdeae9 to your computer and use it in GitHub Desktop.
" WSL yank support
" ==============================================================
" change this path according to your mount point
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
" ==============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment