add win32 clipboard hack

This commit is contained in:
James Dixon 2023-01-03 11:29:36 -05:00
parent 477402a9a1
commit 1105e45c4b

View File

@ -11,3 +11,17 @@ require('plugins')
-- plugin configurations
require('plugin-config')
-- platform/os specific stuff
if vim.fn.has('win32') then
vim.cmd([[
" 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
]])
end