-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Duplicate terminal feature, make session management more vim-like #2449
Comments
Detaching the pty part of panes from the displayed part has been a todo list item for a long time, but it is substantial effort. Are you proposing to do the work? That is the basic requirement to be able to display the same pane in multiple places, although there are of course a lot of further questions, for example how would sizing work, how panes would be targeted, and what the interface would look like. I am not particularly convinced about the idea of allowing panes to be wholly independent, my feeling is that they should always be present in at least one window and session. Note that the model for tmux should be emacs not vim, although in this respect they behave similarly (buffers are not bound to where they are displayed). You should note however that I do not want a model like GNU screen where the pane layout is lost when detached. It is very important that when somone reattaches to a tmux session everything is exactly as they left it, only adapted to the new terminal size and capabilities. |
The big changes we need are, off the top of my head:
There will also probably be a large number of smaller changes to places where there is an assumption that a pane exists in one window. |
@nicm GNU screen's ability to loose layout on detach doesn't look good for me too :). I very like how tmux saves layout. |
Yes, the problem is not doing what to do, it is implementing it.
If you are not planning to work on this, I will close this issue since it is already on the todo list, however I will link this issue from the todo entry. |
@nicm glad to know that it is already on the todo list :) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@alexryndin we now have the ability to display the history of one pane in another, and it can be refreshed at will. Does it address at least some of the use cases for duplicating the pane? It seems to me that it does address the stackoverflow question you posted. I understand that it is not quite what you're looking for. Thanks! @nicm Reopening it temporarily just to get some feedback on this. |
@nicm do you think it's worth spending time on this? I will be able to work on this soon and it looks like a very interesting project to further my understanding of tmux. |
Sure you can work on it if you like but I think it will be complicated so if I was you I would try to get a good idea of what it will look like once it is done and how to break the work up. Splitting pty from pane should not be that difficult (we already support non-pane ptys now like popups), but I don't really know how all the UI and stuff will look, and how we will deal with panes shown in two places at different sizes. Other big things that are on the todo list is a better way to have clients attached to the same session with an independent current window. Or improving how layouts work (for example so they can be sticky). Or hooks need a lot of work (although hooks are pretty boring). |
Thanks for the feedback. This gives me some things to think about. I'll close this issue for now and pursue these in a new thread. |
At the moment, tmux lacks the GNU screen feature to choose the same session (terminal) in different panes.
What I propose is session management rethink to make it more vim-like.
As you may know, in vim different open files are managed as buffers, and buffers are not tied to specific splits (panes in tmux's terminology). You can also have different tabs in vim (windows in tmux's terminology), containing as many splits as you want, and at any time you can choose and show any buffer in any split. Unlike vim, tmux ties up a terminal to a pane, so you can't duplicate an open terminal session, and if you want to see the same session in a different window your only way is to move a whole pane. And then, if you want to bring the terminal session back in the previous window, you have to move a whole pane again. With a vim-like session management, if you'd want to see a session in a different window, you would:
And then you would have the same session in two different windows in different panes.
A little investigation shows that I'm not the only user who wants this feature -- https://unix.stackexchange.com/a/105457.
The text was updated successfully, but these errors were encountered: