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/config.zig | |
| 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/config.zig')
| -rw-r--r-- | src/config.zig | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/config.zig b/src/config.zig index 9451a2a7..93395406 100644 --- a/src/config.zig +++ b/src/config.zig @@ -144,7 +144,6 @@ pub const leader_path = paths: { .Down = "wj", .Up = "wk", .Right = "wl", - .Toggleterm = "wt", // the `j` JUMP group, its own letter rather than more of `w`: the window // group moves focus by GEOMETRY (the pane left of this one), these move it // by TIME (the pane I was in before). `o` and `i` are the letters of the @@ -311,6 +310,18 @@ pub const topbar_str = "New Newcol Find Grep Help Tutor Dump NextColor Debug Kil pub const pane_builtins_str = "New Del"; pub const file_pane_builtins_str = "Save New Del"; +/// Columns kept clear to the RIGHT of a tagline's builtins. The path stays at +/// the left edge and the builtins are pushed over to end this far short of the +/// pane's, which leaves somewhere to type: a word executed from the tagline is +/// how you run anything here, and with the builtins hard against the edge +/// there was nowhere to put one without first making room. +/// +/// The gap that does the pushing is made of ordinary spaces inside the tag, so +/// both it and this run are editable text — see Pardes.tagGap. Widen it and +/// every untouched tagline reflows on the next frame; taglines you have +/// already edited keep the spacing you left them with. +pub const tag_right_pad: u16 = 20; + /// the pane's mode, as ONE character in the layout box at its top-left — live /// chrome, not text you own. It used to be a three-letter word leading every /// tagline; the box was already there carrying no information at all, so the @@ -807,9 +818,11 @@ pub const redo: []const Chord = &.{.{ .cp = 'U' }}; /// where it is still SIGINT. pub const comment_toggle: []const Chord = &.{.{ .cp = 'c', .ctrl = true }}; -/// In body normal mode, clear modal residue and run Toggleterm (the same -/// builtin as `SPC w t`). Elsewhere: leave insert mode; abandon a leader path, -/// tag, armed search or the topbar; raw tty mode forwards it to the program. +/// In body normal mode, clear modal residue and run Last (the same builtin as +/// `SPC j j`): the pane you were in before this one, whichever it was. Held +/// down it alternates between two panes — two files, or a file and its shell. +/// Elsewhere: leave insert mode; abandon a leader path, tag, armed search or +/// the topbar; raw tty mode forwards it to the program. pub const escape: []const Chord = &.{.{ .cp = Key.escape }}; // ---- insert mode ---- |
