Skip to main content

Terminals

The terminal button in the activity bar (or ⌘J) makes the terminals fill the main area: everything right of the activity bar, with no sidebar and no status bar. Choosing Explorer or Git, or pressing the button or ⌘J again, gives the area back to the editor. The shells keep running while the editor is shown.

Choose Dock Terminal in the terminal header or press ⌥⌘J to put the terminal below the editor. Drag the divider to resize it. Maximize Terminal restores the full view and Hide Terminal or ⌘J hides it. The same shells, tabs and panes continue running as you change layouts. Each open project remembers its layout while the window is open.

Each project starts with one zsh (your login shell) in the project folder and keeps its own tabs and panes.

Project scripts​

Open Show Project Scripts in the Command Palette. It lists package.json scripts, Cargo build/check/test commands, and literal targets from the project's Makefile. For JavaScript projects, it follows the packageManager field, then the lockfile, then defaults to npm. Make targets discovered from includes or generated by variables can still be run directly in the shell.

Run starts the displayed command in the project folder in its own terminal tab. Stop interrupts a running script and terminates its process group if it does not exit. Restart stops the current run before starting a new one. The script list shows the exit code, and Show Output reopens the terminal tab with its last output. Opening the list only reads the project files.

Tabs and panes​

┌ zsh ──────┬ server ─┬ + ┐ ← tab strip (shown once there are 2+ tabs)
├───────────┴─────────┴───┤
│ ❯ bun run dev │ ❯ cargo test │
│ … │ … │ ← ⌘D splits side by side
│ ├──────────────┤
│ │ ❯ git status │ ← ⇧⌘D splits one above the other
└───────────────────┴──────────────┘
ActionShortcutNotes
New tab⌘TShows the terminals if they were hidden.
Split side by side⌘DThe shell with the keyboard is split; the new one gets the keyboard.
Split one above the other⇧⌘D
Close panethe pane's ✕ or its menu (⌘W does nothing in a terminal)The sibling takes the whole place; a tab left without panes goes; when the last goes the editor returns.
Resizedrag the divider

A tab with several panes gives each a small header with ×, the shell's title, and ⋯ (New Tab, Split Pane Vertically, Split Pane Horizontally, Restart Session, Restart Codex Daemon, Close).

  • Restart Session replaces a hung shell with a new one in the same place and folder.
  • Restart Codex Daemon runs codex app-server daemon restart, for when Codex keeps showing "Reconnecting to server…" or sits at "Waiting for startup". If the restart does not finish within 20 seconds, the daemon's processes are killed (a stuck daemon ignores a normal stop) and the restart is tried once more. Codex sessions running in terminals are not touched. Start Codex again afterwards.
  • A shell that exits (exit, ⌃D) closes its pane the same way as ×.

Right-click in a terminal for New Tab, Split Pane Vertically/Horizontally, Copy, Paste, Clear Buffer and Close; each shows its shortcut, if it has one.

Keyboard​

ShortcutAction
⌘C / ⌘VCopy the selection / paste (an image on the clipboard is passed on to the program)
⌘KClear the scrollback
⇧PageUp / ⇧PageDownScroll the history by a screen
⇧Home / ⇧EndJump to the oldest / latest output
⌥← / ⌥→Move by word
⌘← / ⌘→Move to the start / end of the line
⇧← ⇧→ ⇧↑ ⇧↓Move the end of the selection
⌥ + textSends the typed text, so characters such as @ work on non-US layouts

Mouse​

  • Drag to select; double-click selects a word or path, triple-click a line; middle-click pastes.
  • Programs that follow the mouse (tmux, vim, htop) receive clicks, drags and the wheel; hold ⇧ to select text instead.
  • Copying joins lines that only wrapped at the screen edge.
  • Dropping files on a terminal pastes their shell-escaped paths, each followed by a space, without running anything.

The status bar stays under the terminals (branch, sync, problems). Its keyboard button on the right opens the shortcuts in a dialog, read from the keymap, so it always matches your bindings. The command palette has the same as Keyboard Shortcuts.