I have indeed used vis, and contributed to it a little bit. I’d been a Vim user for a while, but I’d read Pike’s Structural Regular Expressions paper and was sold on the idea, but switching to sam or acme seemed a bit much, so vis was perfect. In fact, vis’ multiple-cursor support seemed to make it an even better editor for SREs than either of the “official” implementations.
In practice, however, SREs definitely felt like they were invented by somebody who grew up with (and loved) ed and ex. Like the
s/x/y/ command I knew from Vim, most of the interaction I had with SREs involved sitting and thinking for a minute to come up with the expression I wanted, typing it and hitting Enter, then undoing and trying again. The Sam cheat sheet has a list of idioms that I studied, but I never really understood (for example) when to use
-+ and when to use
+-. I much prefer Kakoune’s normal-mode commands because I get visual feedback as I go (instead of having to compose the entire expression and run the whole thing at once), and because it’s easier to just press
m than to write the equivalent regex.
(The SRE paper uses the example of an awk-like tool built on SREs. I think that would be amazing, but as far as I know the only real tools built on SREs have been text-editors.)
As for the interface… like Kakoune, it tries very hard to be minimalist, but it winds up being minimalist in very different directions. For example, Kakoune has very sophisticated completion menus built-in, while multiple-window support is left to external tools like tmux or X11. vis is the exact opposite: it has built-in support for displaying multiple windows, but for completion it uses external tools (or at least it did, last time I checked)
My favourite parts of vis:
- The command prompt is an actual buffer, so you can edit it with the usual keybindings, or copy/paste commands in and out.
- It’s been a while, but my recollection is that when you undo a change in vis, it reverts the change to the buffer content and reverts the change to the selection, making it super-easy to try again. Kakoune tries to maintain the existing selection as the buffer changes, which is strictly-speaking more useful in general, but makes that early learning curve just a bit steeper.
- vis has a dedicated “system clipboard” register like Vim, which shells out to the bundled
vis-clipboard script. The default implementation generally does the right thing, but you’re encouraged to write your own script and stick it earlier on your
$PATH to override the default one.