Developers¶
TurboVI is about 6,200 lines of Python, 3,800 of them code, on turbodesk. 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¶
Ten minutes of typing at this editor found several bugs that no test in the suite could reach. Among them were 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.