Command-line mode: The Command Sigils (:wq) + The Great Substitution (:%s)#8
Conversation
…titution (:%s)
The game now teaches you how to exit vim. Closes the last consensus-core
gap: Acts I-III are a complete vimtutor equivalent.
Engine:
- ModeCmdline entered via ':', with typing, backspace, esc-cancel, and
enter-execute — mirroring search mode
- Executed commands are recorded (lastCommand) for the new commandRun
goal type; :w/:q/:wq/:q! are recorded no-ops (no file to write)
- :s/old/new[/g] and :%s/old/new[/g] substitution: current line or whole
buffer, first-match or global, undoable, cursor clamped when a line
shortens. Plain-text patterns only (no regex) — noted in the code
- HUD echoes the pending command (":wq") like it echoes a search
Content:
- The Command Sigils (Act III, 20): :w, :wq, :q! via commandRun goals
- The Great Substitution (Act III, 21): :s → :%s → /g flag progression
- Placed in Act III, not Act IV as planned: every act's final lesson
must carry the act's boss, and starting Act IV boss-less broke that
invariant. Power Surge slides to order 22; ':' added to its keys
- 22 of 29 curriculum lessons shipped
Docs: LESSONS.md (placement note, commandRun goal row), lessons.csv,
README, gap analysis — the meme gap is marked closed.
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A multi-byte character (é, 日) typed into /search or a :command left a corrupt byte behind on backspace. Shared trimLastRune fixes both paths; regression test covers each.
|
CodeRabbit CLI review disposition (3 findings):
|
Summary
The medium engine feature the gap analysis ranked highest — command-line mode — plus the two lessons it unlocks. This game now teaches you how to exit vim. With it, Acts I–III cover the vimtutor consensus core completely; everything remaining is Act IV power tools (visual mode,
., text objects, marks, registers, macros).New lessons (22/29 shipped)
:w:wq:q!:s/old/new→:%s→/gflagEngine
ModeCmdlinevia:— typing, backspace, esc-cancel, enter-execute, mirroring search mode; the HUD echoes the pending commandcommandRungoal type: met when the player executes exactly:command;:w/:q/:wq/:q!are recorded no-ops (there's no file to write) — validated by the content integrity test:s/old/new[/g]and:%s/old/new[/g]: current-line or whole-buffer, first-match or global, undoable, cursor clamped when lines shorten. Plain-text patterns (no regex) — documented simplification:w(TDD throughout)Placement note
The plan had these in Act IV, but the content invariant "every act's final lesson carries the act's boss" means Act IV can't start boss-less. They live in Act III instead (where
:%ssat in the original roadmap); Power Surge slides to order 22 (id frozen — saves survive). Act IV stays the pure automation world.Test plan
go test ./...green (incl. all 22 lessons solvable at par)go vet,gofmt -lcleanversionsmoke run