One of the tools I use daily as a developer is tmux. Being able to have multiple panes in a single terminal window has definitely improved my workflow.
By default when creating panes, tmux will split the window up into 50% splits. But what if you don't need certain panes to have so much real estate and focus? You just want a small pane to keep an eye on things.
To resize tmux panes, you'll first want to hit your prefix —
ctrl + b by default — and then the colon key
:. What this does is brings up a prompt at the bottom of your screen.
Now you'll want to type in
resize-pane in the prompt, followed by a hyphen
- and either
D, U, L, R. Which you can probably guess stands for down, up, left and right, the direction in which you want your pane to be resized. When using the
resize-pane command, the resize will be applied to the last pane that had focus.
Here is an example of the entire resize pane command that resizes the pane to the left by a cell — the unit in which tmux resizes:
// This assumes that you've hit ctrl + b and : to get to the command prompt :resize-pane -L
Here are some additional tmux pane resizing examples:
:resize-pane -D (Resizes the current pane down by 1 cell) :resize-pane -U (Resizes the current pane upward by 1 cell) :resize-pane -L (Resizes the current pane left by 1 cell) :resize-pane -R (Resizes the current pane right by 1 cell) :resize-pane -D 10 (Resizes the current pane down by 10 cells) :resize-pane -U 10 (Resizes the current pane upward by 10 cells) :resize-pane -L 10 (Resizes the current pane left by 10 cells) :resize-pane -R 10 (Resizes the current pane right by 10 cells)