I am using tmux 2.1.
I have googled this and it seems I can split a window into multiple panes by using the following command:
tmux new-session \; split-window \; split-window -h \; split-window -v
(not sure why the \; is needed but it only works with it)
My issue is the the layout I want is the following:
The only way I can achieve this is by creating 3 windows horizontaly and then going back to the middle window and then splitting that window and I can only do this manually.
Is there anyway to do this via a command?
Thanks!
Best Answer
Briefly, this sequence is what you want:
The flow is:
tmux new-window
: create a window (ok, you wanted a new-session, that does create a window upon startup)split-window -p 66
: allocate bottom two thirds of the vertical space to a secondary pane and focus itsplit-window -d
: split bottom pane in half, vertically, without focusing the new pane (i.e. focus stays on second – now center – pane)split-window -h
: split center pane in half, horizontallyAs for why the \; is needed, check tmux man page: