Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Vi Mode

Vi mode moves a cursor over the pane’s screen and scrollback with vi keys, so you can select and copy text without the mouse. Press Alt+s to enter it. Press y or Enter to copy the selection and leave, or q or Escape to leave without copying.

Note

The search and jump actions (/, ?, n, N, f, F, t, T) are not implemented yet: vi mode swallows those keys and does nothing. toggle-rect-selection (Ctrl+V) currently selects whole lines, because rectangular selection is not implemented yet.

The mouse keeps working in vi mode, even while a program such as nvim tracks the mouse: a click moves the vi cursor, and a drag selects text (and moves the vi cursor to where the drag ends). A selection started with the mouse can be extended with the motion keys, while a click or a drag always starts a new selection. On the primary screen, where the shell runs, the wheel scrolls the scrollback.

On the alternate screen, where full-screen programs such as nvim and Claude Code run, there is no scrollback for vi mode to move through. When the program tracks the mouse, vi mode lets it scroll its own content instead, except while you drag a mouse selection: the scroll keys (Ctrl+Y, Ctrl+E, K, J, Ctrl+B, Ctrl+F) and k on the top line or j on the bottom line send the program wheel events at the vi cursor, and the wheel without Shift reaches the program at the pointer. Any selection is cleared before the program scrolls, and how far each event scrolls is up to the program. A held key scrolls the program at most once every tenth of a second, so a program that speeds up a fast-spinning wheel, as Claude Code does, still scrolls at a steady pace. A program that does not track the mouse, such as less, is not scrolled: there the wheel does nothing while vi mode is on.

Actions

Change these keys in the [vi-mode] table of the configuration file; see Vi mode keys.

ActionDefaultWhat it does
cursor-lefth, ArrowLeftMove the cursor one cell left.
cursor-downj, ArrowDownMove the cursor one cell down.
cursor-upk, ArrowUpMove the cursor one cell up.
cursor-rightl, ArrowRightMove the cursor one cell right.
line-start0Jump to column 0 (of the first row, on a wrapped line).
line-end$Jump to the last non-blank column; pressed again, jump to the last column, or to the end of the text on a wrapped line.
line-first-char^Jump to the first non-blank column.
next-wordwJump to the next (semantic) word start.
previous-wordbJump to the previous (semantic) word start.
next-word-endeJump to the next (semantic) word end.
next-spaceWJump to the next space-delimited word start.
previous-spaceBJump to the previous space-delimited word start.
next-space-endEJump to the next space-delimited word end.
screen-topHJump to the top visible line.
screen-middleMJump to the middle visible line.
screen-bottomLJump to the bottom visible line.
previous-paragraph{Jump to the previous paragraph boundary.
next-paragraph}Jump to the next paragraph boundary.
matching-bracket%Jump to the bracket matching the one under the cursor.
history-topgScroll to the oldest history line.
history-bottomGScroll to the live tail.
page-upCtrl+BScroll one page up.
page-downCtrl+FScroll one page down.
half-page-upKScroll half a page up.
half-page-downJScroll half a page down.
scroll-upCtrl+YScroll one line up.
scroll-downCtrl+EScroll one line down.
toggle-selectionv, SpaceToggle a character-wise selection.
toggle-line-selectionVToggle a line-wise selection.
toggle-rect-selectionCtrl+VToggle a rectangular selection. Currently selects whole lines.
yanky, EnterCopy the selection to the clipboard and leave vi mode.
exitq, Escape, Ctrl+CLeave vi mode.
search-forward/Open the search-down prompt (not implemented yet).
search-backward?Open the search-up prompt (not implemented yet).
search-nextnRepeat the previous search (not implemented yet).
search-previousNRepeat the previous search, reversed (not implemented yet).
jump-forwardfOpen the jump-to-char-forward prompt (not implemented yet).
jump-backwardFOpen the jump-to-char-backward prompt (not implemented yet).
jump-to-forwardtOpen the jump-till-char-forward prompt (not implemented yet).
jump-to-backwardTOpen the jump-till-char-backward prompt (not implemented yet).

The semantic word motions (w, b, e) stop at whitespace and at the characters in [selection] semantic_escape_chars.

Escape and unbound keys

By default, Escape is bound to the exit action, which leaves vi mode entirely. To deselect without leaving vi mode, press the toggle key that matches the selection’s kind: v (or Space) clears a character-wise selection and V a line-wise one. The other key switches the selection to its own kind instead of clearing it.

Keys not bound to any [vi-mode] action are swallowed while vi mode is active (they never reach the pane) — this includes keys from tmux’s vi copy mode (copy-mode-vi) that orzma does not carry over by default, such as : (goto-line), digit repeat prefixes, o (other-end), A (append-and-cancel), X / M-x (mark), ; / , (jump repeat), z (scroll-middle), and D (copy-end-of-line-and-cancel). orzma has no actions for these; you can only bind such a key to one of the actions above.