Suppose I have three horizontal panes stacked up vertically and I would like to push one of them to the far left, such the other two panes are still stacked but on the right.
Current Setup:
Pane 1
----------
Pane 2
----------
Pane 2
Desired setup
Pane 1 | Pane 2
| Pane 3
What is the correct command for doing this?
I have already checked the man page, but could not find this specific functionality.
Best Answer
I've run into this problem a few times and google is utterly useless. Luckily the man page isn't too difficult to read. And documenting this will provide a quick reminder the next time I forget.
The command you're looking for is
move-pane
.You'll have to run it a couple times. I've reindexed the pane numbers to match tmux's convention. Since Pane 0 ultimately borders the other two panes, you should imagine that you're moving Pane 1 (right of 0), and then moving Pane 2 (below Pane 1).
Here are rough keybindings to achieve the same. Just make sure to focus the pane that will move first.
If you have trouble figuring out the pane numbers, remember that the number is assigned by order, the number doesn't stick with any particular pane. Use a keybinding to display the pane numbers before each movement. The default is
PREFIX + q
. If yours is different, you can usePREFIX + ?
to find it.