After doing join-pane on 2 windows, you have 2 horizontal panes. How do I rearrange the panes to be vertical panes instead?
C-b space (bound to
next-layout by default) cycles through available layouts, you can also use the
M-1 to M-5 Arrange panes in one of the five preset layouts: even- horizontal, even-vertical, main-horizontal, main- vertical, or tiled.
On OS X,
man tmux for more details.
4Yup, that worked,
C-b M-1worked for me Oct 29, 2012 at 17:47
8On Linux, Meta => Alt key, so Ctrl-b + Alt-<1-5> does the work.– 0xF1Dec 20, 2019 at 8:32
4If all of above is not working for you, try C-b <Space> Nov 1, 2021 at 23:51
C-b <Space>is the only thing that worked for me indeed Oct 25, 2022 at 10:57
In Mac OS Yosemite, this works:
Prefix + Option-[1-5]
e.g: Ctrl-b Option-1
You should be able to use:
to do this, but I'm unable to test it since OS X doesn't like anything too "meta" (we have at least that in common).
10You should be able to configure your terminal emulator with “option as meta“ (Terminal) or “option as +Esc“ (iTerm2), but you can always type C-b M-2 manually as C-b ESC 2. Oct 26, 2012 at 8:20
There are also an options for explicitly requiring the join/split to happen vertically/horizontally:
(see man page and note that the
-v do not refer to the direction of the separator line).