Closed miversen33 closed 2 years ago
Hello, have you tried these steps first to enable osc52 in tmux?
https://github.com/tmux/tmux/wiki/Clipboard#quick-summary
Also what is your tmux version?
Below is the details from my tmux details. I have previously used oscyank and had no issues, but I seem to be running into some weirdness in migrating to osc52 :/
$ tmux show -s set-clipboard
set-clipboard external
$ tmux info | grep Ms
180: Ms: (string) \033]52;%p1%s;%p2%s\a
$ echo $TERM
xterm-256color
$ tmux -V
tmux 3.0a
To add to this, I can also confirm that the above configuration works fine if I am not running tmux.
Fine being, I can yank and it goes to my system clipboard. So this appears to be localized within how osc52 is talking to tmux
I managed to reproduce your issue. It seems that external
does not work, instead use:
set -s set-clipboard on
Here's a post explaining why on
works but not external
: https://unix.stackexchange.com/questions/560428/what-is-the-difference-between-the-values-off-and-external-for-the-set-clip.
Feel free to reopen the issue if your problem persists :)
Thats really weird. I can confirm that on
fixed the issue. I wonder, any idea why external
worked with oscyank but not with nvim-osc52?
It's because vim-oscyank handled tmux differently than other terminals to support old versions of tmux also. This plugin treats it the same as others but therefore is not compatible with older versions.
Ahh that makes sense. You're awesome, I appreciate you :)
I have the same issue, but setting tmux clipboard to on
doesn't fix the problem.
$ tmux show -s set-clipboard
set-clipboard on
$ tmux info | grep Ms
192: Ms: (string) \033]52;%p1%s;%p2%s\a
$ echo $TERM
xterm-256color
$ tmux -V
tmux 3.3a
@ojroques
What terminal are you using? Do you know if it supports the OSC52 sequence?
I'm using Alacritty. I have solved the issue, I need to add this to my .tmux.conf, set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
.
Thanks for the plugin ^^
I encountered the same problem. Thanks to this issue, I simply used "set -s set-clipboard on" and solve it. :pray:
Hello! I am having an odd issue in that I cannot seem to get osc52 to copy to tmux's system clipboard. I have verified that the tmux clipboard does work as I can copy things from neovim with tmux itself, but that is obviously painful.
I am using the default config in the readme
Specifically, my config can be found here