diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-08 10:44:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-10 09:17:07 -0300 |
| commit | 198889ab8f78b12c9881a20309a792e419ba1386 (patch) | |
| tree | 264bb756389f4c4cbaf68a6a2aabf3d602450a36 /src/tutor.txt | |
| parent | c3c8bbd8d8add99088c774c54bc1acf1e39ec895 (diff) | |
| download | pardes-198889ab8f78b12c9881a20309a792e419ba1386.tar.gz pardes-198889ab8f78b12c9881a20309a792e419ba1386.zip | |
Esc alternates between the last two panes; Toggleterm is gone
Esc ran Toggleterm, which hopped between the newest DOC and the newest
TERMINAL. That distinction never earned its keep. It made Esc unpredictable —
which of three panes you landed on depended on their kinds, not on where you
had been — and it could not alternate between two files at all, which is the
case you hit most. Editing two files, Esc did nothing.
The replacement already existed. Last (SPC j j) is "the pane you were in
before this one, whichever it was": it walks the jump stack for the newest
entry naming a different pane and restores its line and column. So Esc, and
Shift-Esc in tty, now run Last, and Toggleterm is deleted rather than renamed
— a third implementation of "go to the other pane" was the thing to avoid.
SPC w t goes with it; the w group is the four directional moves, and the jump
group already had SPC j j.
Held down, Esc alternates. Two files, a file and its shell, a file and a
+Search — all the same, because Last has no notion of kind to get wrong.
This depends on the swap in the same series: Last reads the stack backwards,
and until hopping stopped appending, the pane you came from could fall off it.
windownav.snap needed only its keys and prose changed — its golden did not
move at all, which is the useful evidence here: for the one scenario the old
builtin handled well, Last produces an identical focus sequence.
Coverage for what it did not handle is new: a unit test opens a second FILE by
looking its name and asserts Esc alternates between two panes of the SAME
kind, which is the case that used to be a no-op.
Docs follow: tutor.txt, docs/helix-keys.md, docs/design.typ, and the builtin
index goldens, which are now one row shorter.
75/75 snapshots, both unit suites, and the macOS ABI build all pass.
Diffstat (limited to 'src/tutor.txt')
| -rw-r--r-- | src/tutor.txt | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/tutor.txt b/src/tutor.txt index 1d01d626..1d51a4ac 100644 --- a/src/tutor.txt +++ b/src/tutor.txt @@ -227,12 +227,14 @@ TTY ($) the REAL shell — prompts + typed input shown, and keys go straight to the pty as terminal input. - ESC: insert -> normal; from body NORMAL it hops between the last - document and last terminal (the same Toggleterm as SPC w t). + ESC: insert -> normal; from body NORMAL it hops to the pane you + were in before this one, whichever it was (the same Last as + SPC j j) — so held down it alternates between two panes. In raw TTY it still goes to the program. - Ctrl-b: toggles TTY on a terminal by default; SHIFT-ESC is the same - toggle, where the host reports modifiers on Escape. Those are - the ONLY ways in or out. + Ctrl-b: toggles TTY on a terminal, and is the only way back OUT of it. + SHIFT-ESC gets you IN, and once in TTY it does what ESC does in + normal mode — hops away, leaving this pane in TTY so coming + back lands you in the program you left. Use `pardes --tty-toggle=g` (or another letter) to make Ctrl-g the toggle instead. Entering is tty-native: if the shell is at a prompt and your modal cursor sits on the input line, it first @@ -494,8 +496,9 @@ Ctrl-w h/j/k/l focus the pane left/down/up/right (SPC w h/j/k/l does the same; Ctrl-w also reaches a tty pane, where SPC belongs to the shell) - Esc hop between the last document and last terminal - (body normal mode; the same builtin as SPC w t) + Esc hop to the pane you were in before this one, so + held down it alternates between two (body normal + mode; the same builtin as SPC j j) Alt-n new terminal below the active one Alt-c move the active terminal into a fresh column @@ -523,8 +526,9 @@ letters join the matcher's glyph set SPC s d / s r Dump / Restore the session SPC w h/j/k/l Left/Down/Up/Right: focus the pane that way - SPC w t Toggleterm: hop between the last document you - looked at and the last terminal, and back + SPC j o / j i Back / Forward: walk the jump history + SPC j j Last: the pane you were in before this one — what + body-normal ESC runs, so it alternates `?` works at ANY depth: SPC ? lists everything, SPC h ? lists only what the "h" group holds. Help writes into a "+Help" OUTPUT BUFFER, @@ -564,7 +568,7 @@ SPC = the leader: a key path runs a builtin (SPC ? lists them; SPC k Kill, SPC d Del, SPC f s Save, SPC f f Find, SPC f n New, - SPC w hjkl focus, SPC w t file <-> terminal) + SPC w hjkl focus, SPC j j the pane before this one) vs Helix: no multi-cursor; selection is LINE-first (x), plus v chars. vs Vim: no verb+noun (dw); motions only move; body-normal Esc hops focus. |
