manipulating panes with precision: resizing with the Resize mode and the Alt quick keys, closing panes, full zoom, toggling pane frames, plus the pinned pane and stacked floating pane concepts for layered workflows.

In episode 4, you were introduced to Zellij's most important foundation: mode-based keybinding. You know that Ctrl+p takes you to Pane mode, Ctrl+n to Resize mode, and that every mode has a set of actions whose hints always show in the status bar. In this episode we stop collecting shortcuts and start deepening your mastery of panes — because panes are the main work unit where you'll live every day.
Creating a pane is easy; what separates beginners from practitioners is how precisely you control space. A pane that's too small makes the editor cramped, a pane that's too large wastes screen, and panes that are never cleaned up let a workspace pile up meaninglessly. In this episode you'll learn to measure and shape your workspace: pixel-ish resizing control, fast focus navigation, consciously closing panes, zooming to one pane when you need concentration, and the features that arrived in Zellij 0.42 — pinned panes and stacked panes for layered workflows.
This episode's map: first we master resize, both through Resize mode and the Alt+= and Alt+- quick keys. Then focus navigation with Alt+h/j/k/l. After that we study close, zoom, and frame toggling. Next come two concepts that revolutionize layout — pinned panes that never shift and stacked panes that stack work neatly. Finally, a habit you should carry: every shortcut in this episode is enabled by default, so you don't need to configure anything to follow along. Let's begin.
Resize is the first skill to level up. Imagine you split a right pane for an editor, then realize the editor needs more columns. There are two paths: enter Resize mode with Ctrl+n, or use the Alt+= and Alt+- quick keys directly from Normal mode.
Resize mode is the most explicit way. After pressing Ctrl+n, notice the status bar change — now every arrow key and h/j/k/l holds one meaning: enlarging the focused pane in that direction. The key: uppercase letters shrink, lowercase letters enlarge. The following table summarizes it.
| Keybind | Action |
|---|---|
Ctrl+n then h / ← | Enlarge the focused pane to the left |
Ctrl+n then l / → | Enlarge the focused pane to the right |
Ctrl+n then j / ↓ | Enlarge the focused pane down |
Ctrl+n then k / ↑ | Enlarge the focused pane up |
Ctrl+n then H | Shrink to the left (give space to the right) |
Ctrl+n then L | Shrink to the right |
Ctrl+n then J | Shrink down |
Ctrl+n then K | Shrink up |
Ctrl+n then = / + | Enlarge the pane generally |
Ctrl+n then - | Shrink the pane generally |
While you're in this mode, Enter or Esc returns you to Normal mode. This pattern is the same in every Zellij mode: enter, perform as many actions as you want, then exit.
Tip
For everyday work, Alt+= and Alt+- are more practical than entering Resize mode — just press them without switching modes, and the focused pane widens or narrows. The mental pattern to build: mode for precision, Alt for speed. When a layout needs fine one-by-one adjustments, use the mode; when you just want to widen the editor once, use the quick key.
One thing that often surprises beginners: resizing takes space from neighboring panes. You don't drag a boundary like in a GUI — you steal space from the adjacent pane. If the neighboring pane can't shrink any further (because it's already at minimum size), the resize quietly stops. This is normal behavior, not a bug. Try it in a practice session: create three panes with Ctrl+p then r twice, then enlarge the middle pane downward and watch the bottom pane shrink.
Resize only means something if you can quickly move focus to the pane you want to change. In episode 3 you already learned Ctrl+p then h/j/k/l. In this episode we polish it into a reflex, plus introduce two extra powers: Alt+h/j/k/l to jump directly from Normal mode, and Ctrl+p then p to switch by pane ID order.
| Keybind | Action |
|---|---|
Alt+h / Alt+← | Focus the pane to the left (or switch tab) |
Alt+l / Alt+→ | Focus the pane to the right (or switch tab) |
Alt+j / Alt+↓ | Focus the pane below |
Alt+k / Alt+↑ | Focus the pane above |
Ctrl+p then h/j/k/l | Same, but from inside Pane mode |
Ctrl+p then p | Move focus to the next pane by ID |
Note the Alt+h and Alt+l detail: in Zellij both quick keys map to MoveFocusOrTab. If there's no pane left in that direction, focus jumps to the next tab — a small feature that makes navigation flow across tabs without entering Tab mode. Alt+j and Alt+k only map to MoveFocus because vertical movement is considered less likely to cross tabs.
One thing to understand: Ctrl+p then p (SwitchFocus) differs from MoveFocus. MoveFocus moves by spatial direction — left, right, up, down. SwitchFocus moves by the pane ID order Zellij assigns. On irregular layouts (for example, many panes from mixed splits), SwitchFocus is often more predictable than guessing at directions.
There's one more that falls into the "rarely used but life-saving" category: Move mode. Press Ctrl+h to enter, then h/j/k/l moves the pane (not focus) in that direction. Ctrl+h then n (or Tab) moves the pane to another tab, and Ctrl+h then p moves the pane backward in order. This is how you restructure a layout without closing and reopening panes.
Closing a pane in Zellij is a firm decision: the process running inside it is stopped too. There's no undo for that within the pane itself. Before pressing Ctrl+p then x, ask: am I running something that isn't saved? A shell holding a Docker session open, an SSH connection, or an htop that's monitoring — all of it dies with the pane.
| Keybind | Action |
|---|---|
Ctrl+p then x | Close the focused pane |
Ctrl+t then x | Close the entire tab (and all panes inside it) |
Ctrl+q | Exit the Zellij session completely |
Ctrl+o then d | Detach from the session (panes stay alive) |
This last difference is very important. Ctrl+q stops the entire session — all tabs, all panes, all processes. Detach (Ctrl+o then d) only disconnects you from the session; panes keep running and can be re-attached with zellij attach. If you're working remotely and want to come back later, always detach, never quit.
Warning
The best confidence-building exercise: create an empty pane specifically for experiments, then close it with Ctrl+p then x. After closing and reopening ten times, the motion stops being scary. But never close a pane running an important process just to "test". A process killed by an accidental close can't be recovered by Zellij — it doesn't store process state.
After a few practice rounds, you'll find the right pattern: panes for short-lived things (ad-hoc commands, checking logs) are closed without hesitation, while panes for long-running things (dev servers, editors) are kept. Unless there's a reason, don't let panes pile up — every active pane is a context you have to remember.
Terminal screens are limited, and sometimes you need every pixel for one task: reading a long traceback, editing a wide file, or watching a running process's output. Zellij provides temporary full zoom — press again to return to the original layout.
| Keybind | Action |
|---|---|
Ctrl+p then f | Zoom the focused pane to fullscreen (toggle) |
Ctrl+p then Shift+f | Fullscreen without the interface (no bars, purest view) |
Ctrl+p then z | Toggle pane frames (the boundary lines between panes) |
Zooming with Ctrl+p then f enlarges the focused pane to fill the entire work area. The magic: the layout isn't lost. The moment you zoom out, all pane positions return to normal. This is the best tool for "entering focus mode" without losing the workspace. Ctrl+p then Shift+f (note the uppercase) even removes the entire interface — the tab bar and status bar are hidden too, leaving a pure pane. Great for screenshots or terminal demo presentations.
Toggling pane frames (Ctrl+p then z) is the opposite: it doesn't remove panes, but removes the boundary lines between them. By default Zellij displays frames so you know each pane's edge — the pane_frames option in the config can even be set to false permanently. Why turn frames off? Some people find the view cleaner and more space-efficient, especially on two-pane layouts whose boundaries are already obvious. Try both and see which is comfortable on your eyes.
Tip
The most effective combination while debugging: zoom to the log pane with Ctrl+p then f, read the output, zoom out, then continue working. This is far faster than temporarily closing a pane. And remember Ctrl+p then z when frames feel noisy — the one row saved in every pane is often enough to show one extra line of code.
Since Zellij 0.42, there's a pinned panes concept that changes how you think about layout. A pinned pane will never be covered, rearranged, or automatically closed by other pane activity. It "sticks" in its position — like a pane given veto power over its own space.
The most tangible application is in floating panes, but the concept applies broadly. Example workflow: you're working in a main pane, then open several floating panes for quick checks. Without pinning, floating panes can shift or pile up following auto-layout rules. With pinning, that floating pane always shows on top — never hidden behind another pane, never moved from its coordinates.
| Keybind | Action |
|---|---|
Ctrl+p then i | Toggle the pinned status of the focused pane |
zellij action toggle-pane-pinned | Same, via CLI (for automation) |
zellij action toggle-pane-pinned
zellij action toggle-pane-pinned --pane-id 3In the interface, a pinned pane is marked — note its frame shows a PIN indicator. This feature was born from real need: a floating pane for team chat, status monitors, or notification panels that must always be visible. In episode 7 we'll dissect pinned floating panes in depth. For this episode, just understand the mental model: pinned means "I don't want Zellij messing with me".
If pinned panes are how you preserve one pane, stacked panes are how you preserve many panes in one space. The concept is simple: certain panes are stacked in the same location, and you choose one to display. Instead of splitting the screen into five cramped sections, you keep five panes in one slot and swap between them quickly.
| Keybind | Action |
|---|---|
Ctrl+p then s | Open a new pane in stacked mode |
Alt+p | Toggle a pane's membership in a group |
Alt+Shift+p | Toggle group marking (selection follows focus) |
Alt+[ / Alt+] | Swap the layout variant |
The fastest way to feel it: open a new session, press Ctrl+p then s twice — now you have three panes in the same location. Move between stacked panes with Alt+h/j/k/l or scroll. Zellij even shows a stacked pane list below the screen (enabled via the stacked_pane_list option), with the currently displayed pane pinned to the bottom of the list. If you want all panes included in a batch operation — close them all, move them to a new tab, or stack them at once — that's the role of Alt+p and Alt+Shift+p for selecting a pane group.
zellij action new-pane --stacked
zellij action stack-panes -- terminal_1 terminal_2For those who like alternatives, two paths to the same stack — keybind for interactive, CLI for automation:
Ctrl+p then sNote
Don't confuse stacked panes with stacked floating panes. Stacked panes (Ctrl+p then s) stack tiled panes — the panes that normally split the screen — in the same location. Stacked floating panes stack several floating panes on top of one another. Both share the same spirit: limited space, many contexts. The floating details will be dissected in episode 7.
Alt+= and Alt+- are much faster for daily adjustments. Use the mode only when you need direction and size precision; otherwise, your life will revolve around modes endlessly.Ctrl+p then x stops the process inside. Check first whether there's unfinished work, and get in the habit of detaching (Ctrl+o then d) rather than quitting (Ctrl+q) when you want to come back.Ctrl+p then p). On complex layouts, direction-based MoveFocus often fails to guess your intent. ID-based focus is more predictable — get used to it to escape pane mazes.This episode strengthened your foundation in what you do most throughout the day: controlling workspace space. You can now resize two ways (mode and quick keys), move focus with precision, close panes with full awareness, zoom into one pane when you need concentration, and manage panes that must persist via pinned panes. With stacked panes added, you have an arsenal for any layout — from simple two-pane setups to layered workspaces.
Key takeaways:
Ctrl+n + direction for precision, Alt+= / Alt+- for speed.Alt+h/j/k/l from Normal mode, Ctrl+p then p for ID-based switching.Ctrl+p then x kills the process — choose detach (Ctrl+o then d) when you want to return.Ctrl+p then f zoom, Ctrl+p then Shift+f pure fullscreen, Ctrl+p then z frame toggle.Ctrl+p then i to pin, Ctrl+p then s for stacked.In episode 6 next, we shift from arranging panes to reading panes: scrollback, search, and copy mode. You'll learn to go back through output that has scrolled off screen with Scroll mode, search text in long buffers, edit scrollback directly in your favorite editor, and manage the clipboard across OSes with copy_command. See you in episode 6.