User guide / Terminals

Terminal modes

Development reference · View source

ModeKeys go toShown as
InsertThe program, except Runyte’s few exceptions[insert] in the pane title
Live NormalRunyte; the screen keeps updatingNo title marker
Normal/reviewRunyte; a frozen snapshot you can navigate and copyReview marker in the title, grayed text
 INSERT ──Ctrl-\──▶ live NORMAL ──Ctrl-\ or a review command──▶ NORMAL/review
   ▲                    │                                           │
   └──────── i, a, o, or another terminal insert key ◀──────────────┘

The title answers whether typing reaches the child, so NORMAL is unmarked: the mode line already says it.

Terminal Insert mode

Every key belongs to the program except:

KeyEffect
Ctrl-\Leave to live Normal mode
Ctrl-wStart the window prefix
Ctrl-h/j/k/lMove between panes, only with editor.fast_pane_keys on
Shift-Left / Shift-RightVisit the previous / next running session, in mux mode (remappable)
  • Escape, Ctrl-c, Ctrl-o, Space, and ordinary keys reach the child unchanged.
  • Window keys from a terminal. Ctrl-w h/j/k/l and their control-key aliases move to another pane at once. Ctrl-w v/s split, leaving the child live in the original pane; the new pane opens the working-directory explorer, as Space E does. Ctrl-w f/z toggle full-screen and zen from terminal Insert, live Normal, Normal/review, and Select without changing the mode. Bare Ctrl-w, or cancelling the prefix, keeps the current mode. Window actions never capture or discard a review snapshot.
  • Arriving at a pane. Every focus route — these keys, pane cycling, a mouse click — enters a live terminal in Insert mode. A terminal with a captured review stays in review until i, a, o, or another insert key. A document reached from Terminal Insert starts in Normal.
  • Ctrl-\ spelling. On macOS, Runyte asks for unambiguous Ctrl-key reports without repeat and release events. A terminal without that protocol sends legacy control bytes, where Ctrl-\ arrives as Ctrl-4; both work.

Review mode

Review navigates and copies. It does not edit. The screen is a picture of the program’s text, and the program owns its own input area, so an edit to those cells would be an edit to a picture. Commands that would edit are refused rather than applied to the buffer behind the pane.

A second Ctrl-\, or the first review command used from live Normal, captures the bounded output as an immutable snapshot. New output keeps arriving behind it.

  • Motions move a visible review caret and keep it within the viewport margin.
  • v enters Select mode; motions then extend inclusively through both the start and end characters, in either direction. Escape cancels a selection.
  • The title marks review and newer output, and the reviewed text is grayed, so a frozen image never looks like a live program.
  • Moving to another pane does not start review; returning to a reviewed terminal keeps its snapshot.
  • A live terminal keeps its own colours. Alternate-screen review holds only the captured visible screen.

Pasting back into the program:

KeySendsAfterwards
p / PRunyte’s selected registerInsert mode, so the next key (usually Enter) reaches the child
Space c p / Space c PThe system clipboardStays in Normal mode
uOne delete per character of the last pasteUndoes that paste
  • Both routes leave review first and write at the child’s real cursor, never into captured output.
  • u works only while the paste is still the child’s last input: any key typed into the terminal ends it. It is refused for a paste that ended a line the child has already run, since what ran is the child’s. A shell at a prompt erases exactly the paste.

i leaves review and types again.