# How to add a horizontal split to tmux window that spans the whole width of the parent window?

When I have a tmux window vertically split into two panes, how can i spawn a new third horizontal pane that stretches over the full width?

e.g. How do I get from this:

Ctr-b %

+–––––––––+–––––––––+
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
+–––––––––+–––––––––+


to this?

Ctr-b %
Ctr-b ...now what?

+–––––––––+–––––––––+
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
+–––––––––+–––––––––+
|                   |
|                   |
+–––––––––––––––––––+


Ctr-b %
Ctr-b "

+––––––––+––––––––––+
|        |          |
|        |          |
|        |          |
|        |          |
|        |          |
|        +––––––––––+
|        |          |
|        |          |
+––––––––+––––––––––+


Note: I don't want to cycle through all possible layout combinations via Ctr-b Space to eventually get to the desired layout - it should be achieved with as much brevity as possible.

• it's amazing that this isn't a solved problem. All of the answers below so far are completely useless and don't address your actual question :-( Commented Jun 2, 2018 at 20:25

tmux 2.3 supports the -f switch in split-window which does exactly what you are looking for (check man here):

The -f option creates a new pane spanning the full window height (with -h) or full window width (with -v), instead of splitting the active pane.

1. CTRL - b+%
+–––––––––+–––––––––+
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
|         |         |
+–––––––––––––––––––+


1. CTRL - b :splitw -fv

Note that after CTRL-b you will be typing in the tmux command-prompt (look at the bottom bar).

+–––––––––+–––––––––+
|         |         |
|         |         |
|         |         |
|         |         |
+–––––––––+–––––––––+
|                   |
|                   |
|                   |
+–––––––––––––––––––+


To have this ready as a keyboard shortcut CTRL-b+- add the following in your tmux.conf :

bind-key - splitw -fw

• This should be accepted answer Commented Sep 14, 2021 at 13:54
• Is there any way to make this a hot key combination? E.g. Ctrl-B + " + "
– ILIV
Commented Jul 17, 2023 at 7:43

You can use one of the five preset layout modes (tiled) to achieve this. From your starting point (a single vertical split), open a new pane, which by default will split the active pane and then arrange the panes into tiled mode:

Ctrlb,Alt5

From man tmux:

M-1 to M-5    Arrange panes in one of the five preset layouts: even-horizontal,even-vertical, main-horizontal, main-vertical, or tiled.

You could optionally add a select-layout tiled to a keybind in your .tmux.conf if this was a layout you wanted regularly.

• I cried when got to know that tmux has presets after years of using it. Commented Jul 23, 2018 at 12:14
• What keys do you press on Mac? Ctrl b, Option 5 is not working for me. Commented Feb 25, 2019 at 22:48
• It's Ctrl b Esc 5 in Mac Commented Dec 17, 2021 at 8:47

Get a newer version of tmux (at least 2.3).

From the man page:

The -f option creates a new pane spanning the full window height (with -h) or full window width (with -v), instead of splitting the active pane.

• good answer, but an example or two would be most illustrative Commented Aug 7, 2019 at 13:28

If you'd like to spawn a new third horizontal pane that stretches over the full width, I suggest you try this

Ctrl-b "

or to cycle through

Ctrl-b space

• Thank you for your suggestion. I don't want to cycle through all possible layouts though, but simply spawn a third pane with the desired layout and position. But maybe your suggestion is the only possible solution to achieve this (which I hope it is not :) Commented Apr 11, 2014 at 23:13
• @elementz did the ctrl-b " double quotes work?? Commented Apr 12, 2014 at 11:55
• No. That ctr-b " creates what you can see in my third example above. Commented Apr 12, 2014 at 12:14

I wound up here looking for a way to move an existing pane to the left, right, top, or botton of the terminal and span the full height or width.

If anyone else ends up here looking for the same thing, the solution is to use split-window, swap-pane, and then kill-pane together.

For example, add this to your .tmux.conf file:

# Pane moving
bind S-Left  split-window -hbf \; swap-pane -t ! \; kill-pane -t !
bind S-Right split-window -hf  \; swap-pane -t ! \; kill-pane -t !
bind S-Up    split-window -bf  \; swap-pane -t ! \; kill-pane -t !
bind S-Down  split-window -f   \; swap-pane -t ! \; kill-pane -t !


Then you can use ctrl+b, shift+left to move the current pane to the left side of the terminal, spanning its full height.

• I prefer, UDLR, but these work great.
– Jess
Commented May 7, 2020 at 20:45

Old question but wanted to add, if there is a layout you want to use often you can use

   tmux list-windows


to give you the current layout (this will be a string like c904,273x74,0,0{81x74,0,0[81x29,0,0,1,81x21,0,30,2,81x22,0,52,3],191x74,82,0,0})

Then pass that string to select-layout to apply it. Look for select-layout in the man page for more info.

• that's a great supplement! Commented Jul 17, 2019 at 9:13

Ctrl + B then " (double quotes) to split into two horizontal windows