# HG changeset patch # User zegervdv # Date 1658750948 -7200 # Node ID ad5e870cd4b27c564df86d7aeaa031114e18092f # Parent c79b392e7919ccf144dbb7458383d830d8c4855d replace osc52 plugin diff -r c79b392e7919 -r ad5e870cd4b2 .chezmoitemplates/config.vim --- a/.chezmoitemplates/config.vim Mon Jul 25 13:56:58 2022 +0200 +++ b/.chezmoitemplates/config.vim Mon Jul 25 14:09:08 2022 +0200 @@ -315,25 +315,6 @@ " Vinegar/NetRW autocmd FileType netrw setl bufhidden=delete " - -function! SendOSCClipboard(lines, regtype) - call SendViaOSC52(join(a:lines, "\n")) -endfunction - -if !s:windows - let g:clipboard = { - \ 'name': 'TMUX', - \ 'copy': { - \ '+': function('SendOSCClipboard'), - \ '*': 'tmux load-buffer -', - \ }, - \ 'paste': { - \ '+': 'tmux save-buffer -', - \ '*': 'tmux save-buffer -', - \ }, - \ 'cache_enabled': 1, - \ } -endif " Load local vimrc if filereadable($HOME . '/.vimrc.local') source ~/.vimrc.local diff -r c79b392e7919 -r ad5e870cd4b2 .chezmoitemplates/init.lua --- a/.chezmoitemplates/init.lua Mon Jul 25 13:56:58 2022 +0200 +++ b/.chezmoitemplates/init.lua Mon Jul 25 14:09:08 2022 +0200 @@ -26,7 +26,18 @@ use { 'tpope/vim-repeat' } use { 'tpope/vim-rsi' } use { 'sgur/vim-editorconfig' } - use { 'ShikChen/osc52.vim' } + use { + 'ojroques/nvim-osc52', + config = function() + local copy = function(lines, _) require('osc52').copy(table.concat(lines, '\n')) end + local paste = function() return { vim.fn.split(vim.fn.getreg '', '\n'), vim.fn.getregtype '' } end + vim.g.clipboard = { + name = 'osc52', + copy = { ['+'] = copy, ['*'] = copy }, + paste = { ['+'] = paste, ['*'] = paste }, + } + end, + } use { 'einfachtoll/didyoumean' } use { diff -r c79b392e7919 -r ad5e870cd4b2 dot_tmux.conf --- a/dot_tmux.conf Mon Jul 25 13:56:58 2022 +0200 +++ b/dot_tmux.conf Mon Jul 25 14:09:08 2022 +0200 @@ -106,6 +106,9 @@ set-window-option -g visual-bell on set-window-option -g bell-action other +# Allow OSC52 from applications +set -s set-clipboard on + # Local config if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'