clipboard stopped working randomly. Added wsl config to work with xclip

This commit is contained in:
Goldyr 2024-03-03 15:57:42 -03:00
parent eb369ed4a0
commit 79c75bcf3d
1 changed files with 12 additions and 0 deletions

View File

@ -111,6 +111,18 @@ vim.opt.showmode = false
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
vim.g.clipboard = {
name = 'WslClipboard',
copy = {
['+'] = 'clip.exe',
['*'] = 'clip.exe',
},
paste = {
['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
},
cache_enabled = 0,
}
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true