Repository navigation
Milestone 2: the Vim engine - #2
Merged
Merged
Conversation
Vim key notation parser, Board remove/insert_at/replace, and an engine with a grid cursor, counts, the : line with :ci, and undo/redo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Object motions (w, b, HJKL), operators and the unnamed register, put with the place-below rule, Visual selection, . and @:, every shape command, write and quit effects, and an undo property test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Insert mode and a small Normal mode inside blocks, stepping by grapheme, the escape setting, and the acceptance test: 62 keys build examples/area.lawh from an empty board. The label moves to (1,-1), where the key path lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
map/noremap in every mode with Vim's typeahead model, timeouts as an effect, :set escape/leader/timeoutlen, and Engine::source for a lawhrc that warns per line. examples/lawhrc mirrors a jkl; setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render_with draws the grid cursor, the current object, the Visual rectangle and selection, the text caret (a math block being edited shows its source) and a status bar with the command line. The renderer also measures objects for the engine, finds carets and hit-tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
winit keys become engine keys (typed character plus modifiers, AltGr never a chord), the overlay and status line are drawn every frame, :w writes atomically, mapping timeouts use a deadline, the view follows the cursor, a click selects, missing and unnamed files open as new boards, lawhrc loads from the config dir, and the math worker logs to stderr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stop . when its insert is refused, bound the keys one typed key may set off (MAX_EXPANDED_KEYS) and index the maps, keep Insert motions local to their line, count flat boxes in the place rule, treat Shift with Esc/CR/BS/Del as the plain key, compare write paths with dots worked out, and add gg/G plus Engine::go_first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hit-test shapes by their geometry and prefer the smallest hit, route Cmd+Q on macOS through the unsaved-changes check, keep permissions and follow symlinks in atomic writes and sync the directory, start the cursor on the first object and open the board above the status bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MAX_KEY_WORK caps the work one typed key may cause; counts stop on no-op. - Board::apply batches a step's changes and rebuilds the index once (undo, redo, deletes, puts). - Backward text motions cache grapheme starts instead of rescanning the line. - Adding or dropping the empty block bumps the board version. - Pending writes are a bounded queue (MAX_PENDING_WRITES) matched by path. - Document the worst-case lawhrc load time next to MAX_MAPS. - Super+Q closes the window on macOS only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… budget - MAX_WRITES_PER_KEY (4): a fifth write in one key is refused and stops the key; :wq/:x past the cap do not quit. MAX_PENDING_WRITES now equals it. - The app serializes the board once per batch of effects and writes each file once, still reporting every write in order. - A Visual motion cut short by the work budget keeps the selection matching its rectangle. - Rewrap doc comments past 100 columns; fix the pending-writes doc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Within one key, an info message no longer replaces an error; a later error still replaces any message, so the message says why a key was cut short. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New docs/keys.md (key and command reference) and docs/research/m2-measurements.md. - architecture.md: key-press data flow, the engine, the settled cursor design, text editing. - CLAUDE.md, README.md, SECURITY.md, testing.md, tech-stack.md, CONTRIBUTING.md updated. - examples/lawhrc commented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Correct :wq/:x/:x! and :li descriptions, derived vs measured numbers, moved file references; list the board property tests, per-key caps for mappings, and click behaviour in block-Normal mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An unnamed board takes its name when the write is reported as done, so a failed :w name leaves it unnamed. A later :w in the same key goes to the pending name. - A leading ~ in a :w path is the home directory (etcetera); ~user is left as typed. - The close warning is armed only while it is on the status line, so a click or a timeout disarms it like a key does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Linux runner ran out of disk during `cargo test --workspace` on PR #2: full debug info for every test binary no longer fits. Line tables keep file and line numbers in backtraces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
dyp, undo and redo,.and@:, and:commands for shapes, text, math, files and:set.map/noremapfamilies,<Leader>, mapping timeouts, andlawhrcread from the config dir.:w; click to select; the view follows the cursor; a warning before closing with unsaved changes.MAX_KEY_WORK), at most 4 writes per key, and limits on undo history and mappings.docs/keys.md, the architecture, testing and security docs, and M2 measurements.Result
examples/area.lawhis built from 62 keys (crates/lawh-core/tests/acceptance.rs).Checks
-D warnings, 669 tests, the Rust 1.95 check and cargo-deny all pass.🤖 Generated with Claude Code