Swap panes #6877

Open
opened 2026-01-31 00:49:35 +00:00 by claunia · 7 comments
Owner

Originally created by @kostrse on GitHub (Mar 14, 2020).

Right now, after splitting my screen onto two panes, I cannot find a way to swap the panes between each other.

In tmux it's possible to move/swap opened panes in different ways.

Moving panes around in tmux:

C-a {          move the current pane to the previous position
C-a }          move the current pane to the next position
C-a C-o        rotate window ‘up’ (i.e. move all panes)
C-a M-o        rotate window ‘down’
C-a !          move the current pane into a new separate
               window (‘break pane’)
C-a :move-pane -t :3.2
               split window 3's pane 2 and move the current pane there

Related tmux commands:

  • swap-pane e.g. :swap-pane -s (first pane index) -t (second pane index)
  • move-pane
Originally created by @kostrse on GitHub (Mar 14, 2020). Right now, after splitting my screen onto two panes, I cannot find a way to swap the panes between each other. In tmux it's possible to move/swap opened panes in different ways. Moving panes around in tmux: ``` C-a { move the current pane to the previous position C-a } move the current pane to the next position C-a C-o rotate window ‘up’ (i.e. move all panes) C-a M-o rotate window ‘down’ C-a ! move the current pane into a new separate window (‘break pane’) C-a :move-pane -t :3.2 split window 3's pane 2 and move the current pane there ``` Related tmux commands: * `swap-pane` e.g. `:swap-pane -s (first pane index) -t (second pane index)` * `move-pane`
claunia added the Help WantedIssue-TaskProduct-TerminalArea-UserInterface labels 2026-01-31 00:49:36 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Mar 16, 2020):

This is fairly similar to another request that's already being tracked in #1000

A switch panes option? Like a switchLeft, switchRight, switchUp, switchDown, to allow the user to rearrange the panes layout (https://github.com/microsoft/terminal/issues/1000#issuecomment-578665067)

but this is unique enough that I'll leave it open to track independently. Thanks!

@zadjii-msft commented on GitHub (Mar 16, 2020): This is fairly similar to another request that's already being tracked in #1000 > A switch panes option? Like a `switchLeft`, `switchRight`, `switchUp`, `switchDown`, to allow the user to rearrange the panes layout (https://github.com/microsoft/terminal/issues/1000#issuecomment-578665067) but this is unique enough that I'll leave it open to track independently. Thanks!
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 16, 2020):

Yanking triage off this one

@DHowett-MSFT commented on GitHub (Mar 16, 2020): Yanking triage off this one
Author
Owner

@zadjii-msft commented on GitHub (Jul 22, 2021):

With #10638 merged, I'm gonna leave this open to track implementing the swapPane(from={id}, to={it}) action. I'm gonna pop the rotatePanes action into it's own separate issue for tracking purposes.

@zadjii-msft commented on GitHub (Jul 22, 2021): With #10638 merged, I'm gonna leave this open to track implementing the `swapPane(from={id}, to={it})` action. I'm gonna pop the `rotatePanes` action into it's own separate issue for tracking purposes.
Author
Owner

@Rosefield commented on GitHub (Jul 22, 2021):

To note, there is now a Pane::SwapPanes function , so all that needs to be done for swap-pane(from{id}, to={id}) is adding the boilerplate for the command and actually calling SwapPanes.

@Rosefield commented on GitHub (Jul 22, 2021): To note, there is now a `Pane::SwapPanes` function , so all that needs to be done for `swap-pane(from{id}, to={id})` is adding the boilerplate for the command and actually calling `SwapPanes.`
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

Oh hey look, this was added in #10780!

@zadjii-msft commented on GitHub (Dec 9, 2021): Oh hey look, this was added in #10780!
Author
Owner

@Rosefield commented on GitHub (Dec 9, 2021):

With #10638 merged, I'm gonna leave this open to track implementing the swapPane(from={id}, to={it}) action. I'm gonna pop the rotatePanes action into it's own separate issue for tracking purposes.

I'm fairly certain that I did not implement this specifically, at least it isn't user accessible, see my comment above. While SwapPanes lets you do all kinds of things, the UI doesn't let you swap 2 arbitrary panes by their IDs.

@Rosefield commented on GitHub (Dec 9, 2021): > With #10638 merged, I'm gonna leave this open to track implementing the `swapPane(from={id}, to={it})` action. I'm gonna pop the `rotatePanes` action into it's own separate issue for tracking purposes. I'm fairly certain that I did not implement this specifically, at least it isn't user accessible, see my comment above. While SwapPanes lets you do all kinds of things, the UI doesn't let you swap 2 arbitrary panes by their IDs.
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

That's what I get for not reading and getting high on closing out issues 😜

@zadjii-msft commented on GitHub (Dec 9, 2021): That's what I get for not reading and getting high on closing out issues 😜
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6877