3

In tmux I currently have these window positions:

+---------------------+
|                     |
|         1           |
+---------------------+
|                     |
|         2           |
|                     |
+---------------------+
|                     |
|         3           |
|                     |
+---------------------+

I then want to take the third pane and move it vertical and full height, like this:

+-------------+-------+
|             |       |
|     1       |       |
|             |       |
|             |       |
+-------------+   3   |
|             |       |
|     2       |       |
|             |       |
|             |       |
+-------------+-------+

Vim has a command for this <C-w>L - how can I do this in tmux?

  • AFAICT, you can't do it in tmux. You can use next-layout command or bind-key + space to switch between builtin layout, none of theme can give you your requirement above. – cuonglm Nov 26 '15 at 4:42
2

This was the best I could come up with, an realistically may be too messy to use, but if its needed it works.
As per @cuonglm's comments, the basic command to reorganise a windows pane's so - at least one of them - is full height is:

  • prefixspace

Problem is, what I'm after isn't defined in the preset layouts, so I needed to keep hitting prefixspace till I got this:

+-----+------+------+
|     |      |      |
|     |      |      |
|     |      |      |
|  1  |  3   |  2   |
|     |      |      |
|     |      |      |
|     |      |      |
+-----+------+------+

Then rotate with prefixo till I got this:

+-----+------+------+
|     |      |      |
|     |      |      |
|     |      |      |
|  1  |  2   |  3   |
|     |      |      |
|     |      |      |
|     |      |      |
+-----+------+------+

Then you can go

  • prefix: - to bring up command prompt
  • :move-pane -h -s 1 -t 0

Where the -h (I guess) means spread the panes horizontally - and doesnt refer to the vertical bar between them.
So finally you get this:

+-------------+-------+
|             |       |
|     1       |       |
|             |       |
|             |       |
+-------------+   3   |
|             |       |
|     2       |       |
|             |       |
|             |       |
+-------------+-------+

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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