Skip to main content

Split Panes

Split any tab into multiple live terminals that sit side by side, and rearrange them by dragging. Every tab in TermFlow holds a recursive split tree, so you can keep splitting a pane into smaller panes as deep as you need.

The mental model: a binary split tree

A tab starts as a single pane. Each time you split, TermFlow divides one pane in two along a divider and keeps both halves live. Because each half can itself be split again, the layout is a tree of nested splits — there is no fixed grid and no hard limit on nesting.

Two split directions, named after the divider line they draw:

CommandDividerResult
Split Horizontala horizontal linetwo panes stacked top / bottom
Split Verticala vertical linetwo panes side by side (left / right)

New panes inherit the live working directory of the pane you split from, so a split drops you in the same folder rather than back at your home directory.

note

"Horizontal" here refers to the orientation of the divider, not the arrangement of the panes. A horizontal divider produces a top pane and a bottom pane. If that feels backwards, the icons on the pane header show it literally — a box cut by a horizontal line vs. a vertical line.

How to split

You can split the focused pane three ways:

  • Pane-header buttons — every pane has a small toolbar in its header with a Split Horizontal button and a Split Vertical button (plus Maximize and Close).
  • Right-click context menu — choose New Pane Horizontally or New Pane Vertically.
  • KeyboardCtrl+Shift+D splits the focused pane horizontally (top / bottom).
info

There is a keyboard shortcut only for the horizontal split (Ctrl+Shift+D). For a vertical (left / right) split, use the pane-header Split Vertical button or the right-click menu.

Here is a three-pane layout — a vertical split on the left, with the right column further split horizontally:

┌ Tab: dev ──────────────────────────────────────────────────┐
│┌ zsh ────────────────────┐┌ server ────────────[H][V][⤢][×]┐│
││ $ git log --oneline ││ ▶ npm run dev ││
││ a1b2c3 fix pane resize ││ VITE ready on :5173 ││
││ d4e5f6 inherit live cwd │├──── drag divider to resize ────┤│
││ │┌ logs ──────────────[H][V][⤢][×]┐│
││ ││ $ tail -f app.log ││
│└──────────────────────────┘└────────────────────────────────┘│
│ ↑ drag this divider to resize each side (10%–90%) │
└──────────────────────────────────────────────────────────────┘

Pane-header controls: H = Split Horizontal V = Split Vertical
⤢ = Maximize/Restore × = Close pane

Resize by dragging the divider

Hover the divider between two panes and drag it. TermFlow constrains each pane to 10%–90% of the shared space, so a pane can never be dragged shut by accident. The two terminals reflow to their new size as you drag.

Maximize a pane, then restore it

Press Ctrl+Shift+Enter (or use the pane header / right-click menu) to maximize the focused pane so it temporarily fills the whole tab — handy when one terminal needs your full attention. Press Ctrl+Shift+Enter again, or click Restore, to drop back into the split layout exactly as it was. Maximize is tracked per tab, so each tab remembers its own maximized pane.

Close a pane

Press Ctrl+Shift+W, or click the × in the pane header. TermFlow shows a confirmation first when the pane still has a real running process, so you do not lose work by fat-fingering the shortcut. Closing a pane collapses its divider and the sibling pane expands to reclaim the space.

Drag-to-split and swap

You can rearrange panes by dragging one pane by its header and dropping it onto another pane. Where you drop inside the target pane decides what happens — TermFlow reads the cursor position as an iTerm2-style drop zone:

Drop locationResult
Outer 30% of any edge (left / right / top / bottom)Split that side — the dragged pane takes that half
Center (the inner region)Swap the two panes' positions

Near a corner, the closer edge wins. This works within a tab, across tabs, and across windows, so you can pull a terminal out of one layout and drop it into another. Press Esc at any time to cancel the drag and leave everything where it was.

Drop-zone map for a pane (while dragging another pane over it):

┌────────────────────────────────────────────┐
│▒▒▒▒▒▒▒▒▒ top 30% → split top ▒▒▒▒▒▒▒▒▒▒▒▒▒│
│▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒│
│▒░ left ░ ░ right ░▒│
│▒░ 30% ░ center → SWAP ░ 30% ░▒│
│▒░ split ░ ░ split ░▒│
│▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒│
│▒▒▒▒▒▒▒ bottom 30% → split bottom ▒▒▒▒▒▒▒▒▒│
└────────────────────────────────────────────┘
tip

Dropping a pane onto a different window hands the live terminal over to that window without restarting it. The full cross-window and tear-off story lives on the Windows and tear-off page.

When a pane's process exits

A split pane never disappears on its own when its shell or command exits — it stays in the layout and shows a Session closed banner along the bottom of the pane, with the exit code when there is one:

┌ zsh ─────────────────────────────────────────[H][V][⤢][×]┐
│ $ ./deploy.sh │
│ Done. │
│ │
│ ┌───────────────────────────────────────────────────────┐│
│ │ Session closed (exit 0) ││
│ │ Press Ctrl+R to start a new session [Restart][Dismiss]││
│ └───────────────────────────────────────────────────────┘│
└───────────────────────────────────────────────────────────┘
  • Restart (or press Ctrl+R while the banner is visible) starts a fresh session in place, keeping the pane exactly where it is.
  • Dismiss (or the × on the banner) hides the banner and leaves the pane empty.

Shortcut summary

ActionShortcut
Split pane horizontally (top / bottom)Ctrl+Shift+D
Maximize / restore focused paneCtrl+Shift+Enter
Close focused paneCtrl+Shift+W
Restart a closed session (while its banner is visible)Ctrl+R
Cancel a drag-to-split / swapEsc

An honest note: The pane-header labels follow the divider-line mnemonic above — Split Horizontal draws a horizontal divider (top / bottom), Split Vertical draws a vertical one (left / right). If you also drive panes through the API, be aware the MCP and REST direction parameter uses the inverse mapping there: horizontal splits to the right and vertical splits below. See the MCP tools reference for the exact parameters.

Next steps

  • Windows and tear-off — drag a pane out into its own OS window with the live process attached.
  • Tabs — organize multiple layouts side by side and move between them.