Reputation: 505
I want to change the postion of a pane such as that I want to change pane 4 to pane 3 after pane 3 exits.
Upvotes: 35
Views: 34171
Reputation: 47209
You may want to consider using layouts and rotate-window
. For example if you are using main-vertical
layout and close the "main" window, then:
C-b M-4
.C-b C-o
or C-b M-o
) until the desired window is main.You might also want to change the prefix to a shorter version. I like back-tick, so I have this in my tmux.conf
file:
unbind-key C-b
set-option -g prefix `
bind-key ` send-prefix
And to make C-o
and M-o
repeatable add:
bind-key -r C-o rotate-window -U
bind-key -r M-o rotate-window -D
Upvotes: 4
Reputation: 1034
To change pane 4 to pane 3 after pane 3 exits:
C-b { move the current pane to the previous position
Here are more shortcuts for moving panes around:
C-b } move the current pane to the next position
C-b C-o rotate window ‘up’ (i.e. move all panes)
C-b M-o rotate window ‘down’
C-b ! move the current pane into a new separate
window (‘break pane’)
C-b :move-pane -t :3.2
split window 3's pane 2 and move the current pane there
Source: tmux cheatsheet
Upvotes: 70