Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say I have a window with two panes (size irrelevant, 'A' = active)

|     |  A  |
|     |     |
|     |     |
|     |     |

If I were to split-window I would get:

|     |  A  |
|     |     |
|     +-----+
|     |     |

Which is normally fine. But can I tell it to split the parent window instead of the current pane? Eg:

|     |  A  |
|     |     |
|           |
share|improve this question

1 Answer 1

Original Answer:
The splitw command supports specifying a target.
Use -t to specify a pane.

Ctrl-B :splitw -t 0

On a very useful side note:

Ctrl-B q
will help to identify what pane to use.

Want to do that frequently to the same pane (like pane number zero, instead of the "current pane")? Then create a keyboard binding.

Expansion to answer:
The following will create the layout that was requested by the ASCII art in the question.

(1): Start with a brand new window. Maybe not strictly required, but I did this to simplify testing.
(2): Make a vertical split (Ctrl-B :splitw -h )
(3): Optional, but recommended: do something in pane #1 so that the pane looks different, just so you can see that this works as intended. (4): press Ctrl-B
(5): Although you need a colon, that is part of the following text. Paste in the following text.

:splitw -t 0 ; splitw -t 0 -h ; selectp -t 1 ; swap-pane -s 3 ; selectp -t 1 ; kill-pane -t 1

(6): Press Enter, to run the compound command.

Note (7): The approach shown depends on specific pane numbers, so step (1) is extremely recommended. I'm not saying that this solution is highly adaptable for other layouts, and so hard-coding the keyboard binding may produce unexpected results in other starting situations. However, this does show how to do what was specifically requested, so this may be a useful demonstration on how to do this manually (which is often helpful when designing an automated approach to a task).
Note (8): I'm quite wary about this approach, especially with the use of kill-pane. It seems that could easily lead to lost work if something doesn't work quite as expected. If you're gutsy enough to want to try putting this into a key binding, consider using the confirm statement, as shown with the default binding for Ctrl-B x (shown with Ctrl-B ?).

share|improve this answer
I appreciate your response, but your examples will only produce the split in my first example. That is to say, it still only splits the target pane, not the "parent" window. I don't think it's possible to split in the way I've specified with an existing vertical split. – jgillman Jan 13 at 17:59
Feedback received. Details in the ASCII art just didn't have enough attention placed to them. In response, original answer has been significantly expanded. – TOOGAM Jan 14 at 2:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.