$EDITOR integration (wave 5, backlog A8)

Watch mode opens the current exercise in $EDITOR (or $VISUAL) when
it starts and whenever the exercise changes: on n, and on a jump
that moves. The editor is spawned detached, so the watcher never
blocks, and a missing editor binary is ignored. A one-line notice
names the opened file, on terminals only. --no-editor and
LISPLINGS_NO_EDITOR turn it off; usage text and the README
workflow/commands sections document the flag.
This commit is contained in:
venomade committed 2026-11-22 11:52:48 +00:00
1 parent 7424463d5e
commit a28a35991f
2 files changed
+60 -14

No files matched your search

+6 -3
View File
@@ -54,9 +54,11 @@ nix run /path/to/lisplings # watch mode, on this directory
progress bar, and the keys that work right now. Crossing into a new
chapter prints that chapter's README above the exercise; `run <name>`
prints the target chapter's README too.
3. Edit that file in any editor and save. The exercise runs again and
the screen redraws; when every check passes it shows `Exercise
done ✓` and the matching solution to compare against.
3. The watcher opens each new exercise in $EDITOR (or $VISUAL). Edit
and save; the exercise runs again and the screen redraws; when
every check passes it shows `Exercise done ✓` and the matching
solution to compare against. Pass `--no-editor`, or set
`LISPLINGS_NO_EDITOR`, to open files by hand instead.
4. Press `n` for the next exercise.
Keys in watch mode (each key is a line: type it, then press ENTER):
@@ -80,6 +82,7 @@ solved.
```sh
./lisplings watch the current exercise (the default)
./lisplings --no-editor watch without opening $EDITOR
./lisplings run [name] run one exercise; also selects it as current
./lisplings hint [name] print every hint paragraph, numbered
./lisplings list [pending|done|all]