Developers¶
TurboVI is about 4,800 lines of Python on turbodesk, and it draws its own buffer: the text comes from the view combinators, with no editor() widget under it.
How it is built. The value every keystroke transforms, why the keymap is not allowed to see the session, and how a modal gets opened from inside a function that must not block.
Getting a checkout running¶
make test # pytest, about half a second
make lint # ruff, ty, pyrefly, zuban and mypy, several passes
make format # ruff format, then --fix, then format again
make docs # this site, into docs/site/
make lint runs through uv run --active, so it needs the virtualenv activated. make test does not.
Two house rules, before you send a patch¶
Never silence a linter. No # noqa, no # type: ignore, no per-file excludes. If a rule is wrong for this codebase, turn it off in ruff.toml with a one-line reason beside it.
Tests name the behaviour (test_a_mark_survives_a_jump_and_comes_back_to_the_character), assert on rendered output where they can, and are mutation-checked before being trusted. A test that still passes when you break the thing it covers is not a test.
Use it by hand¶
Several bugs in this editor's history were found in ten minutes of typing at it, and were reachable by no test in the suite. A missing Ctrl+B. A modal that stacked seventy-nine deep. A file picker that walked its own virtualenv, and a :grep the session answered with "not an editor command". Run it on a real file before you believe a change works.