Skip to content

Commit

Permalink
chore(wsl): use Windows native way to yank and paste. (#736)
Browse files Browse the repository at this point in the history
* chore(wsl): use Windows native way to yank and paste.

* style: update code style.

Co-authored-by: 冷酔閑吟 <[email protected]>

---------

Co-authored-by: 冷酔閑吟 <[email protected]>
  • Loading branch information
ayamir and Jint-lzxy authored May 16, 2023
1 parent 770810b commit b607f5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lua/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ local clipboard_config = function()
}
elseif global.is_wsl then
vim.g.clipboard = {
name = "win32yank-wsl",
name = "psyank-wsl",
copy = {
["+"] = "win32yank.exe -i --crlf",
["*"] = "win32yank.exe -i --crlf",
["+"] = "clip.exe",
["*"] = "clip.exe",
},
paste = {
["+"] = "win32yank.exe -o --lf",
["*"] = "win32yank.exe -o --lf",
["+"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]],
["*"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]],
},
cache_enabled = 0,
}
Expand Down

0 comments on commit b607f5a

Please sign in to comment.