Skip to content

Commit

Permalink
chore(wsl): use Windows native way to yank and paste. (ayamir#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
2 people authored and bleedingfight committed Jun 22, 2023
1 parent 0a253a8 commit 366d8da
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 366d8da

Please sign in to comment.