-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Improve copy / paste support #1288
Comments
Pasting should normally be handled by your system - so it should be the normal way you paste. Could it be that copying isn't working? |
This is related to my old issue, where I indicated that a more explicit message may lead to less surprises. In #1018 I wrote:
Also related: #375 |
@raphCode - could you help me with some context? Are there downsides to implementing your suggestion? |
I dont see any - it is literally just a string change in
I would add the word "system" to this and the previous two lines to clarify that zellij uses the system clipboard as destination. The other thing is that tmux offers (one? multiple?) internal paste buffer(s) like vim. These are not related to the system clipboard and allow copy/pasting text between panes/windows. |
Cool - let's go for it. Is there a reason tmux offers these various buffers aside from historical? (I guess before it supported copying to the system clipboard)? I don't see a use case for these - but if someone relies on them and really wants them implemented, we can look into it. |
You could argue that internal paste buffers work even outside graphical environments and terminal emulators - think the linux framebuffer console in a live rescue system or using an actual hardware video terminal. But most users are probably fine without it... |
Fair enough - I'd be open to implementing it then if there's a need. |
This is to avoid confusion: New users coming from tmux might expect internal copy/paste buffers in zellij which are separate from the system clipboard. It may therefore be surprising where the copied text ends up and that zellij has no dedicated "paste" functionality. Related issues: zellij-org#1288 zellij-org#1018
This is a big issue, part of the reason that I give up with tmux time ago and started to use Terminator. Terminator integrates well with the underlying clipboard system, and you don't need to read a bunch of documentation to be able to use something as basic as the clipboard. I read in a mailing list about Zellij and I thought "wow, this looks cool". I think it's the reason everybody give it a shot, but we cannot exchange usability by appearance, and when a feature so important does not work as intended or is not intuitive how to use it, at least should be well documented. If can't work like all the rest of terminals (Terminal, Terminator, Konsole...), a fix is as easy as to change the message "Text copied to clipboard" by "Text copied to clipboard. Paste it using XYZ...", a hint, based on the system configuration, because some times simple solutions works better than complex ones. Just my two cents. |
@mrsarm - it is documented: https://zellij.dev/documentation/faq.html#copy--paste-isnt-working-how-can-i-fix-this What you suggest isn't feasible though, unfortunately. Zellij is not a terminal emulator like Thank you for your thoughts and suggestions. I would encourage you to use whichever tool suits you best. |
Yea I saw that, but that looks more like workarounds than how to use it. Actually my particular problem was not Zellij pasting what it's in the clipboard, it did when I press |
Zellij does not manage a clipboard at all. All it does is send an ANSI instruction to your terminal emulator to paste to the system clipboard. It seems like your terminal emulator does not support this. There is no feasible way for Zellij to detect this fact, so we cannot provide you feedback for this failed action. We offer you a workaround for this though, in the documented section. I'm not sure what else you'd like us to do. |
If it's a bug, I understand that is not related with the docs, because as you said, it should works as intended. Still I don't understand why Zellij that does not allow you to click right button, open a menu and select "Copy" or something like that like all the terminals, and because I had the same experience and results with Tmux, I thought "Ok, another Tmux, that may have a weird communication with the OS that's why it so complicated to use the mouse or the clipboard". I guess that the underlying implementation of how Tmux and Zellij works have their reasons, and it's a tradeoff you cannot avoid 🤷. BTW is not the only computer where I tried Tmux and had the same issues, if you look for tmux and clipboard on Google or Stackoverflow, there is a long list of people frustrated with the same, and I see a lot of tickets in this repo also with stuff related to the clipboard, so just coincidence, or same underlying implementations that leads to the same problems, but I don't want to be rude, the project looks great, awesome UI, the way to creates and handle panes and tabs is great, and I know well how hard is to maintain OS projects that works for all. Hope these issues are solved at some point and I can give it another try, in the mean time I'll subscribe to the notifications for releases on Github waiting for the right moment. Thanks ! |
Mate - I just explained to you why this happens both for tmux and Zellij. :) Zellij can't let you right click and press "Copy" because it is not a terminal, it is a terminal multiplexer*. You are free to subscribe to the notifications and follow the project - but this is not a problem that will ever be solved. It's as you say - part of the implementation. We can't know about your clipboard. As for being rude: while I don't think you do this intentionally, you're right now in a position where you're giving technical advice to a problem you seem not to fully understand. I get your frustration, I also wish it would "just work" - but quite a few people have devoted a lot of thought to solving this very problem. Maybe trust us that we know how big it is and have read a lot of the stackoverflow threads you mention? *It can theoretically render a textual copy menu, but that menu would still have the same problem and the copy will fail in your case. |
Hi! I learned about Zellij yesterday and I'm giving it a try. So far, it seems great! I experimented disabling mouse-mode, but it is very convenient so I don't want to disable it anymore. I learned that there is a configuration Do you guys think it is a viable option to implement a configuration I've just met Zellij, so I think it's impolite to create a feature request. Instead, I just want to know if my idea above is a viable one and, in case affirmative, perhaps this is a good opportunity for me to learn rust (over the next 18 months 😅) and implement this feature myself. |
Hey @cakira - happy you are enjoying Zellij! I think being able to bind mouse buttons is a cool idea. Once that is possible, you would definitely be able to make it work by sending Otherwise though - have you tried using SHIFT + right-mouse-click? I think that should bypass Zellij and make your terminal do its magic. |
Wow, @imsnif ! |
I went down a rabbit hole figuring out what support the framebuffer and linux console in general had for clipboard functionality because one of my use cases for multiplexers is emergency console access. Long story short, there are mechanisms for buffers, but they're not typically accessed via ANSI. So either a custom integration or a Zellij-specific buffer would be required. |
Note that GNOME Terminal does not support OSC 52, so Zellij will be broken for anyone using the default terminal emulator on Ubuntu or derivatives. (the workaround in the documentation works fine though) |
I found this issue while investigating how to make zellij "copy" work inside WSL2 as it was mentioned above (#1288 (comment)). Just add this to your zellij config ( copy_command "clip.exe" I also opened a PR to add this to the examples of the documentation: zellij-org/zellij-org.github.io#223 |
What about SSH? I opened #3135 earlier, and I'm still hoping this will somehow be resolved to use Neovim with the OSC 52 clipboard provider in Zellij. Maybe a simple redirection of ANSI sequences? I haven't started using any multiplexer yet and I really like Zellij with its great functionality out of the box. No need to add a bunch of plugins, it seems to do its job well out of the box and not being able to paste from the clipboard is the only thing stopping me from starting to use Zellij. So I'm very interested to know if any work is planned in this direction? |
Thank god for this message. Not being able to paste anything to zellij (in wsl) was my biggest frustration and with shift+right -click it works. This should definitely be in the copy paste faq |
As a zellij user, I couldn't figure out how to paste text. When selecting a text in the terminal, the status bar shows "Text copied to clipboard". However, I tried various ways but couldn't manager to paste the copied text. It would a great improvement of user experience if the status bar also gives hint on the shortcuts to paste text.
The text was updated successfully, but these errors were encountered: