Skip to content

Differences from vim

TurboVI follows vim's keys, and where it behaves the same this page says nothing. Everything below is a place where it does not: what was decided on purpose, what is smaller than vim's, what is not there yet. A surprise that is not on this page is a bug; please report it.

Decided on purpose

Searches are Python's regular expressions. \d, \w, \b, lookahead and (…) groups work, and \1 in a :s replacement refers to a group. vim's own dialect does not: no \v, no \< and \> (use \b), no \(…\), no \{n}. \c and \C do work, to ignore or match case for one search.

The mouse belongs to your terminal. TurboVI never turns mouse reporting on, so clicking does not move the cursor and the wheel scrolls the terminal. In exchange, double-click, drag and Cmd+C select and copy as they do everywhere else. See the mouse.

. with a count repeats the change that many times. vim puts the count into the change instead. They agree after dw, where 3. deletes three words either way, and differ after 2dw, where 3. deletes six words here and three in vim.

j and k move by screen line through a line that wraps, as vim's gj and gk do. With an operator in front they still take whole lines.

A filter that fails leaves the text alone. vim replaces the lines with whatever the command printed, error messages included. Here :%!jq . on a file with a stray comma shows the first line of the error and changes nothing.

:!cmd captures what the command prints. One line is shown as a message, more opens a window on it. The command does not get the terminal, so an editor, a pager or anything that asks a question will not work from :!.

:cdo s/a/b/ writes the files it changed. vim's needs | update after it to do that.

Syntax colour comes from the file name, never from what is in the file. Modelines and #! lines are not read. :set syntax=NAME covers the rest.

The config file is a list of ex commands, ~/.config/turbovi/config, the shape of a vimrc without vimscript. :set takes one option at a time: set ic and set scs on two lines, where vim reads set ic scs.

Crash recovery copies the buffer, with no swap file. A modified buffer is copied every few seconds under ~/.local/share/turbovi/recover/, and :recover puts the copy into the buffer without writing it. There is no -r on the command line and no swap-file prompt when two editors open one file.

.editorconfig is read, as Neovim reads it and vim does with a plugin. Its charset is ignored: the encoding is detected from the file's bytes and written back the same. See settings.

Some control keys mean something else. Ctrl+P is the file picker, where vim moves up a line. Ctrl+G is find in project, where vim shows the file name. Ctrl+O goes back along the links followed in the rendered view, not along every jump.

gR is the rendered view, where vim's gR is virtual replace mode, which TurboVI does not have.

Matches are highlighted by default, as in Neovim; vim leaves hlsearch off. :set nohls turns it off.

* and # follow smartcase, so * on Foo with smartcase on finds only Foo. vim's ignore smartcase.

Y is yy, as in vim; Neovim maps it to y$. gc comments, as in Neovim, with the marker chosen by the file's syntax and :set commentstring for the rest.

The clipboard registers + and * are the same one. A copy goes out over the terminal (OSC 52) as well as through a local helper, so it reaches your machine through ssh. Ctrl+R + in insert mode does not read the clipboard: the terminal's own paste does that, as one change.

Smaller than vim's

  • Marks do not move with the text. Insert ten lines above mark a and it still points at the same line number, which now holds other text.
  • Bracket and quote text objects stay on one line. di( works inside f(a, b) and does nothing when the parentheses are on different lines. it and at do cross lines.
  • Registers: deletes do not rotate through "1 to "9. The read-only registers "., ":, "/ and "% do not exist. "a to "z, "A to append, "0, "_ and the clipboard are vim's.
  • :s: the c flag is refused with a message. An empty pattern, :s//x/, does not reuse the last search. Ranges are numbers, ., $, % and offsets; marks, patterns and '<,'> are not read yet.
  • Undo is a line. There is no undo tree, no :earlier, and no U to undo a whole line. It is not kept across sessions.
  • Ctrl+U in insert mode deletes back to the indent, then the indent, where vim stops at the place the insert began.
  • Ctrl+X on a hex number stops at zero, where vim wraps to 0xffffffffffffffff.
  • Visual block is partial. $ does not stretch the block to the end of every line. A tab inside a block makes it ragged. D, X, C and Y on a block take its whole lines, where vim's take the block to the end of each line.
  • Windows form a grid. :sp adds a row across the full width and :vsp a window in the row it is in. Splitting one way at a time looks the same as vim's tree.
  • No argument list. The files named on the command line are the first buffers, and :n, :N, :first and :last step through the buffer list, stopping at either end as vim's do. :args and :n FILE are not read.
  • One quickfix list, with no :cfdo, :colder or :cnewer.
  • :w !cmd sends the whole buffer; a range in front, :1,5w !cmd, is not read.
  • turbovi file +42 opens on a line; vim's +/pattern is not read.

Not there yet

Planned for the next release:

  • History on ↑ and ↓ in the command line, and Tab completion of file and buffer names.
  • '<,'> from visual mode, and marks and patterns as addresses.
  • The line commands :d, :m, :t, :y, :j, :normal, :sort and :r, and & to repeat the last :s.
  • :wa, :qa, :bd, :sav, :up, Ctrl+^ and gf.
  • A jump list on Ctrl+O and Ctrl+I.

Missing, with no date: U, tags and Ctrl+], word completion with Ctrl+N, gq and textwidth, key mappings, tab pages, spell checking, persistent undo.

Not planned

TurboVI will not have plugins, vimscript or any other scripting language, folds, :terminal, or :g and :v. The config file and the Python are where TurboVI is changed.