home: vim: add 'nvim-osc52'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
I do get the message when copying into the clipboard while ssh-ing. But trying to paste from my system clipboard shows that it did *not* get copied. This seems to only happen inside tmux. However tmux itself *does* copy to the clipboard correctly through OSC52.
This commit is contained in:
parent
fe73a304aa
commit
2ffb8e6ee6
|
@ -60,6 +60,7 @@ in
|
|||
|
||||
# General enhancements
|
||||
vim-qf # Better quick-fix list
|
||||
nvim-osc52 # Send clipboard data through terminal escape for SSH
|
||||
|
||||
# Other wrappers
|
||||
git-messenger-vim # A simple blame window
|
||||
|
|
17
home/vim/plugin/settings/ssh.lua
Normal file
17
home/vim/plugin/settings/ssh.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
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},
|
||||
}
|
Loading…
Reference in a new issue