Skip to content

Commit b6ab548

Browse files
committed
added osc for ssh clipboard functionality
1 parent a4a2f8c commit b6ab548

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

lua/custom/plugins/nvim-osc52.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
return {
2+
3+
'ojroques/nvim-osc52',
4+
config = function()
5+
require('osc52').setup {
6+
max_length = 0, -- Maximum length of selection (0 for no limit)
7+
silent = false, -- Disable message on successful copy
8+
trim = false, -- Trim surrounding whitespaces before copy
9+
}
10+
local function copy()
11+
if (vim.v.event.operator == 'y' or vim.v.event.operator == 'd') and vim.v.event.regname == '' then
12+
require('osc52').copy_register ''
13+
end
14+
end
15+
16+
vim.api.nvim_create_autocmd('TextYankPost', { callback = copy })
17+
end,
18+
}

0 commit comments

Comments
 (0)