TurboVI¶
A vi clone for the terminal. Modes, counts, the ["x] [count] operator [count] motion grammar, registers, marks, macros, . repeat, :s, several files, split windows, syntax colouring, find-in-project with a quickfix list, and crash recovery.
1 def greet(name):
2 """Say hello."""
3 return f"hello {name}"
4
5
6 for who in ["world", "turbovi"]:
7 print(greet(who))
8
~
~
NORMAL greet.py 7:5 87%
"greet.py" 8L
:q to leave, :help for what is here.
If you already use vim¶
Most of what your hands do will work. The grammar is the real one: d2w, ci", 3j, "ayy, qa…q, @a, `a. The key reference is the full list of what is bound, and the command reference the full list of what : takes.
Missing: windows in a tree (the layout is a grid), a tag stack, folds, the '<,'> visual range on the command line, :g, and completion. What is missing has the rest of them.
If you do not¶
vi is modal: the keys do different things depending on what mode you are in, and you spend most of your time in the one where j moves the cursor down and types nothing. Getting started is twenty minutes to the point where that stops being strange.
Two things it does that vi does not¶
Find in project. Ctrl+G opens a box that searches every file as you type, groups the hits under their files, and underlines the match where it actually is. Enter jumps to one and fills the quickfix list with the rest. See searching.
.editorconfig. A Makefile indents with a tab and your Python with whatever the project says, without anybody setting anything. See settings.
Why it exists¶
TurboVI is built on turbodesk, and it is the one application on that library that draws its own buffer. The text, the gutter, the status line and the command line all come from the view combinators, with no editor() widget under them. That is deliberate: it is the proof that turbodesk's core carries a real application on its own, rather than only the widgets shipped with it. Two dialogs are the library's, the <C-p> file picker and the frame around the find box.
If that is the interesting part, start at how it is built.