Closed tombh closed 2 years ago
Sorry I was away for a while. Maybe this is related to your issue: #20.
I had seen that one already. The difference is that yanking isn't working at all, for any amount of text.
I can confirm this as well. I think (not sure tho) it happened when I upgraded to tmux 3.3
, but yeah, the yank stopped working unfortunately 🙁
Try using this option then: let g:oscyank_term = 'default'
. It fall backs to the default OSC yank instead of the special case of tmux.
Try using this option then:
let g:oscyank_term = 'default'
.
That seems to do the trick for me. Thank you @ojroques
However, do you know what could be causing the issue? It seems that my local vim is working fine even without setting the option (using tmux
), but the remote vim (ssh and tmux
) seems to work only when the option is set
I can't seem to get this working on mac os x + neovim 0.5.1 + tmux 3.3.
Without tmux it works great!
I did try the default option listed above but couldn't get it working.
Same boat
My versions:
Mac OSX - v12.3.1
neovim - v0.7.0
tmux - 3.3
alacritty - 0.10.1 (2844606)
init.vim has
" start - oscyank plugin conf
let g:oscyank_term = 'default'
augroup Yanker
autocmd!
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankReg "' | endif
augroup END
" end oscyank plugin conf
I tried with the term var as tmux and kitty as well along with default with no luck.
Let me know if any other information is needed.
Edit: Tried without tmux as done by @arooni above, and it works. Is this a tmux issue or oscyank issue?
I'm not familiar with tmux but I'll take a look later. I've found this official guide to set up OSC52 in tmux, maybe it'll be helpful: https://github.com/tmux/tmux/wiki/Clipboard#the-set-clipboard-option. Then after following the guide, you can try again let g:oscyank_term = 'default'
if it still doesn't work.
Yeah read it essentially it asks to check two things...
❯ tmux show -s set-clipboard
set-clipboard external
❯ tmux info|grep Ms
192: Ms: (string) \033]52;%p1%s;%p2%s\a
Followed by let g:oscyank_term = 'default'
in neovim .
Still doesn't work.
However, reading that page further seems like tmux 3.2 and later has a new tmux option copy-command
I am not using it at the moment but wonder if things changed internally that's messing with this plugin
I met the same issue recently and fixed it by let g:oscyank_term = 'default'
.
It seems that it is tmux
causing the issue after I upgraded the version to the latest version (3.3).
Hi @1337G4mer , try set -s set-clipboard on
in tmux.conf
.
I was able to get it to work couple days back by trying few articles on the internet. I unfortunately can't remember how exactly I got it to work though. Bu your suggestion @adonis0147 maybe helpful for future travelers here. As far my issues goes its resolved.
Echoing the previous comment; the
set -s set-clipboard on
I previously had the following which does not work.
set -g -s set-clipboard
that combined with
let g:oscyank_term = 'default'.
seems to make everything work in vim.
I was able to get it to work couple days back by trying few articles on the internet. I unfortunately can't remember how exactly I got it to work though. Bu your suggestion @adonis0147 maybe helpful for future travelers here. As far my issues goes its resolved.
This fix I had was apparently lost when I did the tmux kil-server
Had to run basically this again set -s set-clipboard on
like you guys said and it started working again. Now its in my .tmux.conf file for permannecy
I stumble upon this issue myself and I believe the reason for the plugin now breaking with tmux 3.3 is the following tmux change reported in the Changelog Add an option (default off) to control the passthrough escape sequence
with the option documented as follow
allow-passthrough [on | off]
Allow programs in the pane to bypass tmux using a terminal escape sequence (\ePtmux;...\e\\).
And this escape sequence is what this plugin is using by default when run within tmux
So with default tmux and vim configs, the sequence is being filtered out by tmux 3.3.
To make this plugin work with tmux 3.3, one has to allow-passthrough on
in their tmux config, or let g:oscyank_term = 'default'
in their vim config to not use the special tmux handling (but then tmux has to detect that the terminal is supporting OSC52 via the Ms
capability in the terminfo, otherwise it will filter it out too)
Thanks a lot @tardypad! I've updated the README with a link to your comment.
Thanks for your work on this plugin. You'll be pleased to know that any editor code here was pasted thanks to it 🤓
Curiously I couldn't get it to work out of the box with my setup.
I tried
vim.g.oscyank_term = 'screen'
, which worked but could only copy a few characters. So I updated the plugin'sget_OSC52_tmux
function to:Here's the change side by side:
I don't know why I need something different? Is it because I'm using such recent versions of my alacritty, tmux, nvim? Here's what I think are the relevant lines from my
tmux.conf
:I'm happy to help more, provide more debugging etc if it's useful.