-
-
Notifications
You must be signed in to change notification settings - Fork 736
Keyboard Select And Copy commands. #947
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
Comments
Looks like this issue is not getting the attention it deserves. Zellij is for heavy users of terminals. I'm pretty sure many of them, like me, prefer TUI applications because it's just much easier and faster to just keep the hands on the keyboard. Having to select text by mouse just for copying things seems a bit counter-intuitive to me. Not to mention some devices don't come with a mouse:
Or maybe it's already implemented and I somehow missed it? Sorry if that's the case. |
One workaround I can think of is to edit the current buffer with an editor (e.g. Helix) that supports copying text to Zellij. It's a pretty bad workaround tho IMO. Too many steps:
I wish I can have something like the copy mode in tmux. |
This is the zellij way of doing this. IMO it's a much better and more natural way, allowing you to outsource to your editor rather than learning a whole new interface (or having to deal with an interface that is similar to one you know, eg. vim-like keys, but is not feature complete for you and will never be without reimplementing vim completely). It should however involve exactly the same amount of keyspresses as copy mode in tmux:
These both have to happen for tmux as well. The wait is kind of up to your editor though. I use vim and for me its always instantaneous even with the maximum default scrollbuffer.
This doesn't happen in any editor that supports opening a file to a specific line. Iirc this wasn't implemented in helix at the time I wrote this feature - would be happy to also make it work with helix once they add support for this.
All of these would happen in a copy-mode like editor as well. |
Thanks for the reply! It's very detailed! Sorry I only tested the flow in Helix and assumed that it's the same in other editors. I will look into Helix to see if that's supported. I guess in that case the only difference would be the extra step to exit the editor in the end, but that's much better already. |
I think you can totally rig most editors to exit after a copy. I'll leave this as an exercise for the reader :) |
At first I was a bit disappointed when I found this issue and read the discussion. I'm even thinking that given the view that Zellij shouldn't provide keyboard-driven select-copy, why not limit it even further? Why not only expose the history/scrollback via So, I decided to try Zellij out, with a config with a binding to |
@magthe re-starting emacs quickly, why not use an emacs server, and then edit with emacsclient? |
Note I totally understand Zellij and tmux are two different projects and I'm not implying that Zellij should become tmux. I'm using tmux here only to facilitate demonstrating the use case.) Now that this old thread is dug out... Tbh this is still one of main things that deter me from daily driving with Zellij. I understand that it's the maintainer's decision to not implement something like tmux's copy mode, and I respect that. However, apart from the extra keystroke, the actual main downside for me is the context switch that comes with this approach. With something like tmux's copy mode, you act on what's on your screen, with all the text positioning and colors in place. Once the buffer is sent to the editor, the positioning can change (due to bufferlines and stuff), and the colors are most definitely lost. There's some mental effort to refocus on where you wanted to work on before entering this mode. And it's another context switch after you finish copying and exit the editor. |
Mainly because it's fast enough without the added complexity 😃 However, that's very much off-topic for this ticket. |
Yes, that's why I consider my setup an experiment for now. The upsides I see are:
As I'm not doing any searching at all using Zellij I can avoid losing context by just jumping to the end of the scrollback buffer on opening Emacs. When returning I jump back to the current command line, so that's exactly like when leaving copy-mode in tmux. |
Interestingly in This opens the buffer in (readonly in this example) with all the colors and glyphs and the status line disabled and cursor moved to the end to help preserve context. I wonder if Zellij could also save the escape sequences to do something similar. |
i'll say this is one issue that keeps me from trying out zellij seriously. i used to use tmux. but, i had some reliability issues with it. so, not i use gnu session, which is okay, but not as comfortable for me as tmux, or as zellij looks to be. (one other thing for me would be being able to configure e.g., nice looking system, though. |
Would be nice to copy text via the keyboard rather then having to use the mouse.
The text was updated successfully, but these errors were encountered: