tmux transpose / rearrange panes?

djechlin picture djechlin · Mar 6, 2015 · Viewed 9.6k times · Source

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?

Answer

Chris Johnsen picture Chris Johnsen · Mar 7, 2015

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.