From f8f1bc3cfe8154de6945150bdffbeccda53fc3d6 Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 16 May 2023 11:43:48 +0800 Subject: [PATCH] chore(wsl): use Windows native way to yank and paste. (#736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(wsl): use Windows native way to yank and paste. * style: update code style. Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> --------- Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> --- lua/core/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 2a98461817..4e1bf4c2ff 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -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, }