mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 08:15:35 +00:00
Saved SSH hosts and their usage counts move out of config.json into servers.json beside it, so config.json can be synced between machines without carrying a server list (#911). An older config.json is split on first load: servers.json is written first (0600), then only the two keys are removed from config.json, leaving every other key as it was. When both files hold hosts, servers.json wins and the stale copy falls out of config.json at its next save. A servers.json that does not parse is kept aside and blocks saves, as config.json does; hand edits hot-reload. Settings -> Window & Tabs -> SSH tab title (`ssh_tab_title`) pins an SSH tab to the profile name (saved host name, ~/.ssh/config alias, or the address typed for a quick connect) or the hostname, on the OSC title's rung of the existing label ladder: a renamed tab still wins, OSC titles are still tracked, local panes are untouched (#726).
136 lines
5.7 KiB
Plaintext
136 lines
5.7 KiB
Plaintext
---
|
||
title: "Tabs and splits"
|
||
description: "Opening, arranging, and rearranging the panes in a tab."
|
||
---
|
||
|
||
<Note>
|
||
Keys are written in macOS notation. On Windows and Linux, read <kbd>⌘</kbd> as
|
||
<kbd>Ctrl ⇧</kbd> for most window actions — the exact chords are on the
|
||
[keyboard shortcuts](/reference/keyboard-shortcuts) page.
|
||
</Note>
|
||
|
||
## Tabs
|
||
|
||
| | |
|
||
|---|---|
|
||
| <kbd>⌘ T</kbd> | New tab |
|
||
| <kbd>⌘ W</kbd> | Close the tab (or the focused pane, if the tab has more than one) |
|
||
| <kbd>⌘ ⇧ T</kbd> | Reopen the tab you just closed |
|
||
| <kbd>⌘ 1</kbd> … <kbd>⌘ 9</kbd> | Jump to tab 1–9 |
|
||
| <kbd>⌃ ⇥</kbd> · <kbd>⌃ ⇧ ⇥</kbd> | Hold to walk the switcher forwards or backwards; it commits when you let go |
|
||
|
||
A new tab always opens in the current pane's directory. Where it lands in the
|
||
list is **Settings → Window & Tabs → New tab position** — *After current* by
|
||
default, or *At end*.
|
||
|
||
An SSH tab is named by whatever the remote shell titles itself, like any other.
|
||
To keep it on the host instead, set **Settings → Window & Tabs → SSH tab
|
||
title** to *Profile name* — the saved host's name, the `~/.ssh/config` alias, or
|
||
the address you typed — or *Hostname*. A tab you renamed keeps its name either
|
||
way, and a split tab still follows the pane in front.
|
||
|
||
Right-click a tab for the rest: rename, split right or down, a new worktree tab,
|
||
copy the working directory, copy the session id, close · close others · close to
|
||
the right, and — when a coding agent is running there — mark unread and fork its
|
||
session.
|
||
|
||
## Splits
|
||
|
||
| | |
|
||
|---|---|
|
||
| <kbd>⌘ D</kbd> | Split right |
|
||
| <kbd>⌘ ⇧ D</kbd> | Split down |
|
||
| <kbd>⌘ ]</kbd> · <kbd>⌘ [</kbd> | Next pane · previous pane |
|
||
| <kbd>⌘ ⌥ ← → ↑ ↓</kbd> | Focus the pane in that direction |
|
||
| <kbd>⌘ ⇧ ⏎</kbd> | Zoom the focused pane to fill the tab |
|
||
| <kbd>⌘ ⏎</kbd> | Fullscreen the window |
|
||
|
||
A split inherits the current pane's working directory, so splitting inside a
|
||
repository keeps you in the repository.
|
||
|
||
Resizing and swapping panes have no default keys — bind them under **Settings →
|
||
Keybindings**, or run them from the command palette (*Resize Pane Left*, *Swap
|
||
Pane Next*, and friends).
|
||
|
||
Inactive panes are dimmed slightly so the focused one is obvious. Turn that off
|
||
with **Settings → Appearance → Dim inactive panes**.
|
||
|
||
## Rearranging by dragging
|
||
|
||
Hover a pane and a small grip appears along its top edge. Drag it to move that
|
||
pane somewhere else in the tab.
|
||
|
||
<Frame caption="Dragging a pane by its grip, with the landing highlighted">
|
||
<video autoPlay muted loop playsInline src="/images/pane-drag.mp4" aria-label="Dragging a pane to a new position" />
|
||
</Frame>
|
||
|
||
Where you drop it decides what happens:
|
||
|
||
<AccordionGroup>
|
||
<Accordion title="On a pane's side">
|
||
The pane goes in **beside** that one. If it is facing a neighbour in the
|
||
same row or column, it joins that row and takes an equal share of it. Only
|
||
when it faces across the layout — where there is no row to join — does it
|
||
split that pane in half.
|
||
</Accordion>
|
||
<Accordion title="On a pane's middle">
|
||
The two panes **trade places**.
|
||
</Accordion>
|
||
<Accordion title="Past a pane's outer side">
|
||
The band beyond the outermost edge — the side facing the window rather than
|
||
another pane — makes the dragged pane a full-width or full-height band
|
||
beside everything else, sized to an even share of what that side already
|
||
holds. A pane in the middle of a 2×2 becomes a full-height *third* column in
|
||
one drag, rather than taking half the window.
|
||
</Accordion>
|
||
</AccordionGroup>
|
||
|
||
The landing lights up while you drag, and only ever lights up when the drop
|
||
would actually change the layout.
|
||
|
||
## Making one tab a pane of another
|
||
|
||
Two sessions you keep switching between belong in one tab. Drag a tab — by its
|
||
chip in the tab bar, or by its row in the sidebar — out over the panes and drop
|
||
it where you want it: it becomes a pane of the tab you are looking at, and the
|
||
tab it came from is gone.
|
||
|
||
The landing reads exactly as it does for a pane, minus the middle: a tab has
|
||
nothing here to trade places with, so a pane's middle means "split it the way it
|
||
is longest". A tab that was itself split arrives with its panes still arranged
|
||
the way you left them, taking one share of whatever row or column it joined.
|
||
|
||
Nothing restarts on the way over. A shell mid-command, an SSH session, a coding
|
||
agent halfway through a turn — all of them keep running; only the tab they were
|
||
in goes away. The tab's *name* does not come along.
|
||
|
||
Picking a tab up does not switch to it, so the tab you drop into is the one you
|
||
were already looking at. A plain click still switches, as always.
|
||
|
||
## Making a pane a tab of its own
|
||
|
||
The same move backwards. Drag a pane by its grip up to the tab bar — or out to
|
||
the sidebar, if that is where your tabs live — and a caret shows which two tabs
|
||
it would go between. Drop it and it leaves the split it was in and becomes a tab
|
||
of its own, at that spot.
|
||
|
||
Nothing restarts here either. The last pane in a tab has nowhere to go, since it
|
||
is already a tab on its own, so no caret appears for it.
|
||
|
||
## Closing something that is busy
|
||
|
||
Closing a pane or tab with a command still running asks first, and says what is
|
||
running: *"cargo is still running. Closing ends it."* When a coding agent is
|
||
mid-turn it says that instead — *"Claude Code is still working. Closing ends its
|
||
turn."*
|
||
|
||
## Where the tabs live
|
||
|
||
**Settings → Window & Tabs → Tab bar position** puts tabs in a vertical sidebar
|
||
on the left (the default) or a horizontal strip on top. The sidebar has room for
|
||
things a strip does not — git branch, diff counts, agent status — so most of
|
||
[its own page](/window/sidebar) is about that.
|
||
|
||
<kbd>⌘ B</kbd> toggles the sidebar; <kbd>⌘ J</kbd> toggles the
|
||
[side panel](/window/side-panel) on the right.
|