-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space-p and Space-R not working inside Tmux #8715
Comments
\cc @xJonathanLEI Does macOS server still have I've been debugging with @teenjuna on Matrix to see if we can get |
Might require Another possibility is |
As I said on Matrix, this doesn't seem to help. With those options enabled:
|
I'm not sure if you're asking specifically about the discontinued macOS Server as I don't use it. I did mention about using a macOS "server" in #8182 but I actually meant just any macOS device with SSH server turned on. And yes on my Macbook these 2 binaries exist, so inverting the option would break tmux - which is why I put tmux first in #8182 in the first place. Since this issue specifically mentions In fact, pasting does also work, but only for content you originally copied with tmux. This means that if you have 2 tmux windows running Helix, and you However, this is not specific to macOS. Using tmux on all systems has always been like this for me. I guess this is because |
But if you have a different setup and always only use But before that happens, I would vote for keeping it as-is, since the "using tmux locally" use case has a reasonable workaround: pressing the native paste shortcut; while the other side (i.e. "using tmux remotely") wouldn't have a solution if #8182 is reverted. |
I can confirm that if I yank something inside helix, I can past it with
When pasting into helix: yes, it works. But copying from helix is not possible, and the only workaround I found is to use select-mode inside tmux, but that's limited to current scroll position and also copies line numbers. In other words, it's quite unusable.
I think it would be great, but looks like it's not possible at the moment. I was going to just patch it locally and build from source, but failed due to some runtime directory mess (compiled with |
Wait this doesn't sound right. It means your terminal emulator is not working with |
Yes. |
No I haven't! Thank you for this tip. It looks like yanking started to work! This makes it usable! |
I guess this is why I had those lines as a workaround:
|
np happy to help :) So now yanking should work perfectly. For pasting though, you will have to use different keys based on where you copied from. |
Yeah, this is less than ideal, but still usable, and I'm happy to wait until clipboard provider can be set in config. I know that helix prefers to automatically decide things like this (as per comment from another maintainer on Matrix), but this issue proves that sometimes there are different use cases. Do you agree, @archseer? |
@xJonathanLEI honest question: does |
^ This is what I meant when I asked if you checked if OSC 52 forwarding was configured in iTerm2 settings |
Allowing user config is something we should support but it wasn't needed until now since it's only necessary if there was a bug like this. A solution for this specific case would be to always use the OSC 52 provider (it's currently only set as a fallback) in combination with any provider we detect. Then we wouldn't even need this tmux specific workaround with load-buffer |
Yeah, my bad |
Also just noticed this. hx 23.10, tmux on MacOS using Terminal.app. Tmux is configured to use my MacOS clipboard with the Pasting from the system clipboard works fine with commandv (in insert mode), but copying is a little more tricky -- |
@n8henrie As noted in the thread, copying should work as long as your terminal can properly access clipboard via OSC 52, even if you're on tmux, as tmux itself would send a OSC 52 signal when yanking. This comment from above shows how to enable OSC 52 for iTerm2. I don't personally use Terminal.app (in fact I use Asahi Linux most of the time now lol, it's awesome), so I'm not sure how to configure that. But once it's properly configured yanking should work for both tmux and system clipboard. |
Oh it looks like Terminal.app simply doesn't support OSC sequences. Someone event built a tool specifically to work around that. I guess in this case the best solution is still to allow customizing clipboard provider. That doesn't seem to be a priority though, as I assume most users are on more advanced terminal emulators. |
Thanks for your time @xJonathanLEI -- I'm pretty sure Terminal.app doesn't support OSC 52, I've investigated these issues in the past. EDIT: you beat me to it Also using Asahi (NixOS) a fair amount, dual booting :) I might just try to figure out how to define a custom command in helix and use that as needed. Having helix copy and paste to tmux instead of the system clipboard isn't bad, just not what I'm used to! |
@xJonathanLEI @teenjuna reading through this, I have a similar problem which I can't seem to resolve. Basically I have helix (23.10) on a remote Linux machine running Ubuntu, connected through ssh & tmux in iTerm2. My
On my tmux session, running
The issue that I'm seeing is inability to read/write from system clipboard, i.e. copy/paste from inside the helix editor to outside iTerm2 (e.g. to a browser) |
Did anyone find a resolution for this? I'm using Tmux + Alacritty with Helix, and
Yanking to the system clipboard works fine, but not pasting from it, as others have discussed in this thread. The only solution I've found was the one mentioned here (i.e. |
@thomasschafer I ran out of options trying every single thing available out there. Basically I connect from my macos terminal (Alacritty) with OSC52 enabled for Copy and paste. I ssh into a Debian machine, where I operate over tmux. None of the said options work. Could you help with the config needed on both macos side and on the remote side? |
@inianv I'm afraid I don't know - I think your best option would be to build from source and fiddle with this function until you get something working, or even just have a look at that function without modification and see if there is a binary you might need to install |
After this PR was merged I've found that setting |
Discussed in #8470
Originally posted by yusuphgammut October 6, 2023
Hello.
I recently updated my operating system to macOs Ventura and since then the Space-p and Space-R keymaps are not working inside Tmux. However, Ctrl-v works as expected. Before that they worked ok. Any idea on how to address this?
Alacritty version:
alacritty 0.13.0-dev (e35e5ad)
.Tmux version:
tmux 3.3a
.Helix version:
helix 23.05 (072e1eae)
.Outside Tmux,
hx --health
returns this:Inside Tmux,
hx --health
returns this:And
tmux show -s set-clipboard
returns this:Seems to have started after #8182 because this prioritizes the tmux codepath over
pbcopy
/pbpaste
. It seems to happen on iterm2 / default system terminal and the OSC 52 yank isn't forwarded to the system clipboard.The text was updated successfully, but these errors were encountered: