TurboVI¶
TurboVI is a vi clone for the terminal. It has 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, a rendered view for Markdown, and crash recovery.
def greet(name):
"""Say hello."""
return f"hello {name}"
for who in ["world", "turbovi"]:
print(greet(who))
~
~
NORMAL greet.py 7:5 87%
"greet.py" 8L
:q to leave, :help for what is here.
In six slides¶
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.
Where it behaves differently, on purpose or because it is not there yet, differences from vim says so, one place at a time.
If you do not¶
vi is modal: the keys do different things depending on what mode you are in. 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.
Three 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.
It leaves your mouse alone. Double-click a word, Cmd+C, paste it into another application: all of it works, because TurboVI never turns mouse reporting on. See the mouse.
Why it exists¶
TurboVI is built on turbodesk. 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. It shows that turbodesk's core is enough to build a real application on. 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.