Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson

Already subscribed? Sign In

Autoplay

    Zoom and resize to view a particular pane within tmux

    Bonnie EisenmanBonnie Eisenman

    Sometimes you'll want to zoom in on a specific pane within a tmux window. We'll learn to use C-b z to temporarily zoom in on one pane, as well as how to resize your panes with C-b -L, -R, -U, and -D.

    tmuxtmux
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    00:00 We're working within this view.js example, we might find we want to focus on a particular pane within our tmux session. We can do this with control-B and then Z for zoom. I can work within this pane as normal, but don't worry, all of my other panes are still there.

    00:15 If I type control-B and then Z again, I'll zoom back out, and now, I have all of my panes back. If you want to resize your panes, we'll go a little bit less all or nothing, tmux also provides you with controls for doing that.

    00:27 We can type control-B and then colon, and get into this command mode. From here, we can type resize-pane, with a hyphen, and then -D, will resize that pane downwards. In case that wasn't dramatic enough for you, we can also specify how much we should we resize the pane.

    00:47 Again, control-B colon to get into command mode, then resize-pane -D, and now, we can provide a size. For example, 30 will bring us downwards by 30 cells.

    01:01 Now, I use control-B and then the down arrow key to move into the lower pane, and similarly, I can do control-B colon, and then resize-pane -U to go upwards, and let's go up by 80.

    01:13 Now, you can see that we can also upwards, same goes for left and right. Control-B colon, resize-pane -R pushes just a little bit to the right. Finally, control-B colon resize-pane -L brings us to the left. It's up, down, left, and right, are your options for the flags passed to resize-pane.

    Discuss

    Discuss