From ea228d1b832401db8efe33a5db4099ba41d42509 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 00:26:12 -0300 Subject: config.zig: every binding and every piece of Look syntax in one file Retargeting a key, a mouse chord or a spelling is now an edit to src/config.zig and nothing else. Three parts in reading order: pardes's own bindings (where a reader lands), the Look/Exec syntax, then the helix keymap under a banner saying hxdiff/hxparity are differential suites against real helix, so a key moved there is a divergence and not a tweak. The bindings are data a comptime loop can walk, because the builtin index is going to walk them. Duplication this cut: is/isC/isA became one hit(key, chords) over ~132 call sites, and a binding being a LIST collapses the letter-or-arrow chains; swap_enter_tab is gone, replaced by look_key/exec_key that can point anywhere; the four focus builtins' h/j/k/l lived hardcoded in two places and is now one table. No golden moved. --- test/snapshots/rsearch.snap | 2 +- test/snapshots/tagcmd.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/snapshots/rsearch.snap b/test/snapshots/rsearch.snap index 669483e9..738afc23 100644 --- a/test/snapshots/rsearch.snap +++ b/test/snapshots/rsearch.snap @@ -1,5 +1,5 @@ # acme button-3 in a text file = search: right-click / right-select reuse the -# `/` machinery. A click expands the file-ish word (look.isFileChar) and, when +# `/` machinery. A click expands the file-ish word (config.isFileChar) and, when # it names no file, searches the buffer for it — hits into the +Search output # buffer, n/N walk them like `/`. A right-select searches the span verbatim. # A real path (sub/dep.txt:3) still resolves and OPENS — expansion keeps / . : diff --git a/test/snapshots/tagcmd.snap b/test/snapshots/tagcmd.snap index d5317b8d..6183af0d 100644 --- a/test/snapshots/tagcmd.snap +++ b/test/snapshots/tagcmd.snap @@ -4,7 +4,7 @@ # Motions walk the tag's words (w selects the "Save" span, exactly like a body # word motion), the execute chord runs the one under the cursor and hands the # body back in normal mode — same keys as the body, so Tab by default (see -# swap_enter_tab). Esc backs out instead, leaving the tail as it was. +# config.look_key/exec_key). Esc backs out instead, leaving the tail as it was. lines c.txt 6 start 30 100 c.txt wait 8000 Kill Newcol -- cgit v1.3