diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-14 21:26:47 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | a624a56e289e4a02a411f83741f0f2c9fc0f0b2e (patch) | |
| tree | b87e3ca10dd1c4417112164f792b5da1e26de0a6 /src/tutor.txt | |
| parent | 95681ff7017b8a9e4c8f9fa6a7371d1233432f2f (diff) | |
| download | pardes-a624a56e289e4a02a411f83741f0f2c9fc0f0b2e.tar.gz pardes-a624a56e289e4a02a411f83741f0f2c9fc0f0b2e.zip | |
Add Linux Tty9p mounted terminals and forward raw TTY keys
Diffstat (limited to 'src/tutor.txt')
| -rw-r--r-- | src/tutor.txt | 61 |
1 files changed, 23 insertions, 38 deletions
diff --git a/src/tutor.txt b/src/tutor.txt index 7ee56add..ae22ede9 100644 --- a/src/tutor.txt +++ b/src/tutor.txt @@ -26,7 +26,7 @@ SIX PARTS, ordered by what is most different from editors you know: 1 — THE MOUSE. Acme's three buttons; nothing like vim. 2 — PANES. Moving between them. Esc, Shift-Esc, Ctrl-w. - 3 — THE TTY. A terminal is a pane. Ctrl-b and Shift-Esc. + 3 — THE TTY. Raw input, prompt-aware Esc, and the mode tag. 4 — DETACHED. The core outliving the terminal showing it. 5 — THE KEYS. Helix-style modal, and where it differs. 6 — THE REST. PDFs, images, the language backend, scripting. @@ -149,42 +149,26 @@ INSERT (^) the same page; keys type an insertion overlay. TTY ($) the REAL shell. Prompts back, keys straight to the pty. - THE TOGGLE - Ctrl-b in and out of raw TTY, on a terminal pane - Shift-Esc the same toggle, spelled for hosts that report modifiers - on Escape + ENTERING TTY + Ctrl-b toggle raw TTY/editor mode on a terminal pane + Shift-Esc also enters raw TTY from editor mode + Togglettymode in the pane tag switches modes in either direction - `pardes --tty-toggle=g` makes it Ctrl-g instead — any letter but `c`, - which stays SIGINT. + `pardes --tty-toggle=g` chooses Ctrl-g for toggling instead. + Entering TTY moves the shell's real cursor to the place you selected + on its prompt input line, using its OSC 133 prompt marks. - Entering TTY is tty-NATIVE, and this is the part worth understanding. - If the shell is at a prompt and your modal cursor sits on the input - line, pardes first moves the shell's REAL cursor to that spot, counting - back the prompt columns that were hidden from you. It does that with - arrow keys the shell already understands, through the shell's own OSC - 133 semantic prompt marks — it does not fake a cursor on top. So you - navigate the clean page, hit the toggle where you want to keep typing, - and you are IN the live shell at that spot. + RAW INPUT + Ctrl-b switches to editor mode. Other keys go to the child, + including Ctrl-o, Ctrl-w, Ctrl-V, Ctrl-Shift-V, Alt shortcuts, and + modified Escape. Plain Esc at a detected shell prompt hops + to the previous pane. While a program owns the terminal, Esc goes + to that program too. Use the Togglettymode tag to leave raw input + in place. Desktop paste events still feed the child. - LEAVING - Ctrl-b back to normal on this pane - Shift-Esc hop AWAY, leaving this pane in TTY — so coming back - lands you in the program you left - Esc goes to the program... unless the leaf process is a - SHELL sitting at its prompt, in which case it hops away - exactly like Shift-Esc - - That last rule is the one people ask about. A shell prompt is a pane - you can leave, so plain Esc leaves it; a full-screen program (vim, a - pager, an agent) has taken the tty, so Esc belongs to the program and - you need Shift-Esc. Pardes knows which by asking whether the pane's - leaf process is still the prompt it forked. - - PASTING INTO THE PROGRAM - Ctrl-V type the DEFAULT register — what `y` put there - Ctrl-Shift-V ask the SYSTEM clipboard - SPC p and the mouse chords cannot reach here: the pty owns every - keystroke and every button. + On Linux, Tty9p (SPC n 9 from editor mode) opens a terminal with + this session mounted through kernel v9fs. It asks sudo in that pane, + then starts your normal shell. $PARDES_MOUNT names its mounted tree. `Filter` in a terminal's tag toggles a pane-local, theme-keyed palette. @@ -456,11 +440,12 @@ typed Alt-n new terminal below Alt-c pane into a new column TTY a terminal IS a pane - Ctrl-b or Shift-Esc toggles the shell, landing its cursor - where you navigated + Ctrl-b toggles raw input; Shift-Esc enters from editor mode + Togglettymode in the tag switches modes in either direction Esc goes to the program — except at a shell PROMPT, where - it hops away like Shift-Esc - Ctrl-V default register, Ctrl-Shift-V system clipboard + it hops to the previous pane + Ctrl-b switches to editor mode + All other keys belong to the child, including Ctrl-V DETACHED pardes --detach[=name] the core, no terminal pardes --attach[=name] a frontend for it |
