Skip to content

Vi Mode

Navigate scrollback and select text with vi-style keys — no mouse, no arrow keys.

Status

This feature is supported in terminal pane, not supported in Otty's built-in code editor yet.

Entering / leaving

ActionBinding
Enter Vi Mode⌃⇧Space (Control-Shift-Space)
Show / hide the key-hint bar⌘/
LeaveEsc or q (or the × on the pill)

In Vi Mode the terminal stops forwarding keys to the shell — they drive the cursor through scrollback instead. The binding is remappable under Keybindings (command Vi Mode); a separate Mark Mode command (no default binding) enters the same mode with an arrow-key + Shift-select emphasis.

Repeat counts

Prefix any motion with a number to repeat it: 5j moves down five lines, 3w jumps three words forward, 10k up ten. The pending count shows in the Vi Mode pill as you type it.

Motion

KeyMove
h j k lleft / down / up / right
w b eword forward / back / end
0 $line start / end
^first non-blank character
H M Ltop / middle / bottom of the screen
g g / Gtop / bottom of scrollback
⌃u / ⌃dhalf-page up / down
⌃b / ⌃ffull-page up / down

Arrow keys mirror hjkl, so Mark Mode works without learning the letters.

Selection

KeyMode
vcharacter-wise visual
Vline-wise visual
⌃vblock (rectangular) visual
oswap the cursor to the other end of the selection
yyank to clipboard (exits Vi Mode)
Entercopy the selection and exit

/ searches forward, ? searches backward — both open the find bar to type a query. Press Esc to hand focus back to the buffer, then n / N step the vi cursor through matches (n in the search direction, N against it).

f enters Hint Mode for keyboard-driven clicking of on-screen links.

Customizing

Vi Mode has no config-file keys. Remap the Vi Mode, Mark Mode, and Vi Mode Key Hints commands under Keybindings.

See also

  • Find — text search inside the focused pane.
  • Hint Mode — keyboard-driven clicking, complementary.
  • Keybindings — remap any Vi Mode key.

Otty