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.
| Action | Default | What it does |
|---|---|---|
cursor-left | h, ArrowLeft | Move the cursor one cell left. |
cursor-down | j, ArrowDown | Move the cursor one cell down. |
cursor-up | k, ArrowUp | Move the cursor one cell up. |
cursor-right | l, ArrowRight | Move the cursor one cell right. |
line-start | 0 | Jump 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-word | w | Jump to the next (semantic) word start. |
previous-word | b | Jump to the previous (semantic) word start. |
next-word-end | e | Jump to the next (semantic) word end. |
next-space | W | Jump to the next space-delimited word start. |
previous-space | B | Jump to the previous space-delimited word start. |
next-space-end | E | Jump to the next space-delimited word end. |
screen-top | H | Jump to the top visible line. |
screen-middle | M | Jump to the middle visible line. |
screen-bottom | L | Jump 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-top | g | Scroll to the oldest history line. |
history-bottom | G | Scroll to the live tail. |
page-up | Ctrl+B | Scroll one page up. |
page-down | Ctrl+F | Scroll one page down. |
half-page-up | K | Scroll half a page up. |
half-page-down | J | Scroll half a page down. |
scroll-up | Ctrl+Y | Scroll one line up. |
scroll-down | Ctrl+E | Scroll one line down. |
toggle-selection | v, Space | Toggle a character-wise selection. |
toggle-line-selection | V | Toggle a line-wise selection. |
toggle-rect-selection | Ctrl+V | Toggle a rectangular selection. Currently selects whole lines. |
yank | y, Enter | Copy the selection to the clipboard and leave vi mode. |
exit | q, Escape, Ctrl+C | Leave vi mode. |
search-forward | / | Open the search-down prompt (not implemented yet). |
search-backward | ? | Open the search-up prompt (not implemented yet). |
search-next | n | Repeat the previous search (not implemented yet). |
search-previous | N | Repeat the previous search, reversed (not implemented yet). |
jump-forward | f | Open the jump-to-char-forward prompt (not implemented yet). |
jump-backward | F | Open the jump-to-char-backward prompt (not implemented yet). |
jump-to-forward | t | Open the jump-till-char-forward prompt (not implemented yet). |
jump-to-backward | T | Open 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.