Guides

Copy-mode & Search

Vi-style keyboard selection over a pane's scrollback, search, and yank.

Copy-mode freezes the focused pane and gives you a vi-style cursor over its screen and scrollback, so you can search, select and copy without touching the mouse.

  • leader+y enters copy-mode (copy-mode).
  • leader+/ enters copy-mode with the search prompt open (copy-mode-search).

Alternate screen

Copy-mode is unavailable while the pane shows an alternate screen (vim, less, a full-screen agent TUI). Use mouse drag-selection there — it works even when the app owns the mouse.

Keys

KeysAction
h j k l / arrowsMove the cursor
w / bNext / previous word
0 / $ (Home / End)Start / end of line
g / GTop of scrollback / bottom
Ctrl+u / Ctrl+dHalf page up / down
Ctrl+b / Ctrl+f (PageUp / PageDown)Full page up / down
vStart a character-wise selection
VStart a line-wise selection
y / EnterCopy the selection and leave copy-mode
/ / ?Search forward / backward
n / NNext / previous match
q / EscLeave copy-mode

In the search prompt, Enter runs the search and Esc cancels it. Matches are highlighted in the pane.

Mouse selection

Outside copy-mode, dragging in any pane selects text and copies it on release — including inside apps with mouse reporting (opencode, vim, less). Scrolling over a pane that doesn't report the mouse scrolls its scrollback.

On this page