nix-config/modules/home/vim/plugin/settings/ssh.lua
Bruno BELANYI 65a8f7c481 home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the
top-level directory.
2023-11-11 18:12:05 +00:00

18 lines
387 B
Lua

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