Skip to content

refactor: modularize the vim engine into src/vim/ - #62

Open
oribarilan wants to merge 18 commits into
mainfrom
refactor/vim-engine-modularization
Open

refactor: modularize the vim engine into src/vim/#62
oribarilan wants to merge 18 commits into
mainfrom
refactor/vim-engine-modularization

Conversation

@oribarilan

Copy link
Copy Markdown
Owner

Splits the monolithic src/vim.ts (656 lines) into a focused src/vim/ module tree behind a thin barrel, with tests split to mirror the layout. Rebased on v0.16.0.

What changed

  • Module split: src/vim.ts becomes src/vim/ with one concern per file: types, text, tables, util, state, insert, normal, visual, plus an index.ts barrel that re-exports only the public surface. Handlers stay pure; nothing under src/vim/ touches the plugin api.
  • Pending state: consolidated the two pending-state fields into a single discriminated union. This also fixes a bug where dgg and drx left a dangling delete operator that corrupted the next motion.
  • Tests: test/vim.test.ts split into per-module suites under test/vim/, plus a new test/integration.test.ts for the full pipeline.
  • Docs: added the modularization and text-objects design notes under docs/plans/, and updated AGENTS.md to describe the new layout.

Behavior

No user-facing behavior change beyond the dangling-operator fix. The :w/:write feature from #60 is untouched (it lives in src/index.ts, outside the engine).

Verification

just check passes locally: lint clean (24 files), 209 tests, 0 fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant