Pane Folding

Pane folding collapses a pane into a thin strip that shows only its title. The program inside keeps running. The panes beside the strip take over the space it gave up, and when you unfold it, the pane returns to exactly the place and size it had.

Fold the panes you want to keep but do not need to watch right now:

  • a coding agent that works for twenty minutes,
  • a dev server or a test watcher,
  • a tail -f on a log,
  • a build you are waiting on.

Closing such a pane loses its state. Maximizing the pane you work in hides every other pane. Folding does neither: everything stays in the layout, labeled, one keystroke from coming back.

What a fold looks like

A tab with three stacked panes, before and after you fold the top one:

Before After folding pane 1 ┌─────────────────────────┐ ┌─────────────────────────┐ │ 1 agent │ │▓▓ 1 · agent ▓▓▓▓▓▓▓▓▓▓▓▓│ │ │ ├─────────────────────────┤ │ │ │ 2 tests │ ├─────────────────────────┤ │ │ │ 2 tests │ │ │ │ │ ├─────────────────────────┤ ├─────────────────────────┤ │ 3 server │ │ 3 server │ │ │ │ │ │ │ └─────────────────────────┘ └─────────────────────────┘

The strip shows a fold icon, the pane's title, and the last part of its working directory. Pane 1 is still running behind it. Panes 2 and 3 grew into the rows it gave up. Focus moved to a pane you can type in.

How it differs from closing and maximizing

CloseMaximizeFold
The program keeps runningNoYesYes
You still see the other panesYesNo, they hideYes
Who gets the spaceThe neighboring panesThe maximized paneThe neighboring panes
You get the pane backNoYes, in its placeYes, in its place and at its size

Maximize and fold are two ends of one control. The size ladder walks a pane from folded, to normal, to maximized with one key pair.

Try it in 60 seconds

You need Nash 0.7.0 or newer. Check with nash --version, and update with nash update or the download page.

SUPER is the Command key on macOS.

  1. Press SUPER+SHIFT+D to split the pane into two stacked panes.
  2. Move focus to the top pane with CTRL+ALT+K. Start something long there, for example ping localhost.
  3. Press SUPER+SHIFT+E. The top pane folds to a strip. The bottom pane takes the space and receives focus.
  4. Press SUPER+E. The strip unfolds, and the top pane is back in its place at its old size. ping never stopped.

You can also double-click a strip to unfold it.

What to read next

Versions

CapabilityNash
Maximized pane badge and corner marker0.5.6
Pane folding, SUPER+E and SUPER+SHIFT+E, nash cli fold-pane0.7.0
SUPER+M and SUPER+SHIFT+M on the same ladder0.7.4
SUPER+E restores a maximized pane0.7.4
Enter unfolds a selected strip0.8.1

We recommend the latest release.