Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tmux transpose / rearrange panes?

Tags:

unix

tmux

panes

I have a layout right now that looks like

 1
***
 2
***
 3

and I want it to look like

 1
***
 3
***
 2

I know the command C-b C-o cycles their positions, but it's not possible to write a transposition as a product of cycles, mathematically speaking. I also know there are commands to reorder windows but I am interested in panes. Can this be accomplished?

like image 550
djechlin Avatar asked Mar 06 '15 15:03

djechlin


People also ask

How do you reorder tmux panes?

From the middle pane use Prefix } , or from the bottom pane use Prefix { . The default bindings for these keys are swap-pane -D and swap-pane -U . This will re-order the contents of the panes, but the indices of the panes will stay the same.

How do I change the layout on tmux?

To change the layout of panes in a Tmux windows, press <prefix><space> . It will change between different layouts. We may also use command select-layout (or selectl for short) instead. Possible layouts are: even-horizontal , even-vertical , main-horizontal , main-vertical , tiled .

How do you change panes?

If you hold the Alt key, you can use your arrow keys to move your focus between panes.

How do I change my split in tmux?

Switching between panes Alternatively, you can use your arrow keys to navigate to a pane according to your layout. For example, if you've got two open panes divided by a horizontal split, you can press Ctrl+B followed by the Up arrow to switch from the lower pane to the top pane.


1 Answers

From the middle pane use Prefix}, or from the bottom pane use Prefix{. The default bindings for these keys are swap-pane -D and swap-pane -U.

like image 121
Chris Johnsen Avatar answered Oct 01 '22 04:10

Chris Johnsen