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 -fon 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
| Close | Maximize | Fold | |
|---|---|---|---|
| The program keeps running | No | Yes | Yes |
| You still see the other panes | Yes | No, they hide | Yes |
| Who gets the space | The neighboring panes | The maximized pane | The neighboring panes |
| You get the pane back | No | Yes, in its place | Yes, 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.
- Press
SUPER+SHIFT+Dto split the pane into two stacked panes. - Move focus to the top pane with
CTRL+ALT+K. Start something long there, for exampleping localhost. - Press
SUPER+SHIFT+E. The top pane folds to a strip. The bottom pane takes the space and receives focus. - Press
SUPER+E. The strip unfolds, and the top pane is back in its place at its old size.pingnever stopped.
You can also double-click a strip to unfold it.
What to read next
- Fold and Unfold a Pane lists every key, mouse gesture, and command.
- The Pane Size Ladder explains how
SUPER+EandSUPER+SHIFT+Ealso maximize and restore panes. - How Folding Rearranges Your Panes tells you which neighbor takes the space, and what happens to focus.
- Configuration changes the colors, thickness, and title of a strip.
- Scripting folds panes from a shell
with
nash cli fold-pane. - Fold state is saved with your layout. See Persistence and Limits, Session Restore, and the Multiplexer.
- Running an agent in a pane you fold? Its status still shows in the tab title. See Connect Your Coding Agent.
Versions
| Capability | Nash |
|---|---|
| Maximized pane badge and corner marker | 0.5.6 |
Pane folding, SUPER+E and SUPER+SHIFT+E, nash cli fold-pane | 0.7.0 |
SUPER+M and SUPER+SHIFT+M on the same ladder | 0.7.4 |
SUPER+E restores a maximized pane | 0.7.4 |
Enter unfolds a selected strip | 0.8.1 |
We recommend the latest release.