316

After doing join-pane on 2 windows, you have 2 horizontal panes. How do I rearrange the panes to be vertical panes instead?

krishonadish
  • 3,271
  • 2
  • 15
  • 6

4 Answers4

443

C-b space (bound to next-layout by default) cycles through available layouts, you can also use the select-layout command.

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, M is Esc, i.e. Ctrl-b Esc-1.

See man tmux for more details.

Vetle
  • 103
  • 3
jdd
  • 4,736
  • 1
  • 15
  • 4
17

In Mac OS Yosemite, this works:

Prefix + Option-[1-5]

e.g: Ctrl-b Option-1

mic84
  • 2,363
  • 2
  • 21
  • 17
joest
  • 271
  • 2
  • 4
13

You should be able to use:

ctrl-b meta-2

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).

Source: http://hyperpolyglot.org/multiplexers

Journeyman Geek
  • 127,463
  • 52
  • 260
  • 430
rocking_ellipse
  • 243
  • 1
  • 7
  • 10
    You 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. – Chris Johnsen Oct 26 '12 at 08:20
2

There are also an options for explicitly requiring the join/split to happen vertically/horizontally: -h and -v

(see man page and note that the -h/-v do not refer to the direction of the separator line).

peterph
  • 221
  • 1
  • 4