How To Zoom Tmux Panes For Better Text Visibility
I have been using GNU Screen and Tmux terminal multiplexers for many years now. They help a lot when doing different tasks simultaneously. Today I encountered with one of cool feature of Tmux – Zooming panes. If you don’t know already, we can zoom Tmux panes to fit them into the full size of current Terminal window for better text visibility and for viewing more of its contents. It is useful when you need more space or focus on a specific task. After finishing that task, you can zoom out (unzoom) the Tmux pane back to its normal position.
Zoom Tmux Panes For Better Text Visibility
First launch a tmux session by running the following command in your Terminal:
Now split the Tmux session window into two or more windows named panes. You can split the tmux session window either vertically or horizontally.
To split a Tmux session horizontally, press Ctrl+b and ” (single quotation mark). You don’t need to press both keystrokes simultaneously. First press Ctrl+b and then press “.
Similarly, to split a pane vertically, press Ctrl+b and %.
We can also split the session windows both horizontally and vertically at the same time.
For the purpose of this guide, I split the session in vertical and ran “top” command in the left pane and “uname” command on the right pane as shown in the below screenshot.
Now, I am going to zoom the left pane which has top command running. To do so, switch to left pane and press <Tmux prefix> and z. The tmux prefix command is Ctrl+b, so I type Ctrl+b followed by z to zoom the pane. It is that simple!
Note: To switch between panes, press Ctrl+b and Arrow keys (Left, Right, Up, Down).
Here is the animated video shows zooming tmux panes.
To zoom out the Tmux pane, simply press “Ctrl+b” and “z” again.
For more details, refer man pages.
$ man tmux
Hope this helps.