Resize a pane on a failing spec with TMux

Hello,

I watched the video on TMux and I installed it to make it working with vim. It works but when there is a failing spec, the size of pane is not enough to show the entire error’s trace. I must to resize the pane to show it. Is it possible to resize the window automaticaly if there is an error and keep the same size if the specs pass?

Thanks!

You can resize the pane using the resize-pane -U command. I have binded pane resizing in my .tmux.conf (.local) like this:

bind-key -r       H resize-pane -L 5
bind-key -r       J resize-pane -D 5
bind-key -r       K resize-pane -U 5
bind-key -r       L resize-pane -R 5

So typing prefix + <shift>K makes the window bigger.

However, for the specific problem you have, you probably just want to blow up the window and then go back to what you had before. prefix + z (I think of it as “zoom”) makes the current pane blow up to be the whole terminal. You can go back with the same command again. When I have a long stacktrace, I use zoom, look, then unzoom.

1 Like

It’s not exactly what I’m looking for. I need to make prefix + K many times to set the pane at the right size. Prefix + Z can be useful but I want to keep my editor opened at the same time. Is it possible to say to the pane #1 to take 80% of the size and resize others?

Thanks for help!

@Guirec_Corbel… when you resize one pane, the others automatically resize to fit the remaining space.

Also, if you just use

<Prefix> : resize-pane -{H/D/U/R} [amount]

directly without a shortcut, you can add whatever adjustment amount you want. Now that I’ve got some muscle-memory around these commands, I use them fairly often.

I think I will use the @geoffharcourt’s solution but with a higher value. It works well and it’s easy to use.

Glad I could be of help. For what it’s worth, after pressing prefix, you can immediately press the uppercase motion letter multiple times without having to press prefix again if you still want to retain finer-grained control.

To press multiple time is very useful. Thanks again.