nix-config/home/vim/plugin/settings/ssh.lua

18 lines
387 B
Lua
Raw Normal View History

if not require("ambroisie.utils").is_ssh() then
return
end
local function copy(lines, _)
2023-05-06 19:58:30 +02:00
require("osc52").copy(table.concat(lines, "\n"))
end
local function paste()
2023-05-06 19:58:30 +02:00
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
end
vim.g.clipboard = {
2023-05-06 19:58:30 +02:00
name = "osc52",
copy = { ["+"] = copy, ["*"] = copy },
paste = { ["+"] = paste, ["*"] = paste },
}