vis (https://github.com/martanne/vis) is considered an editor in the same vain than kakoune. martanne, its author even participates on #kakoune IRC channel.
It’s a spiritual successor to both vim and sam, with a modernized C codebase. It offers structural expressions to do similar things like kakoune s
or S
. See https://github.com/martanne/vis/wiki/Differences-from-Kakoune
vis has a lua interpreter to write plugins but does not (yet) offer a client/server architecture.
Did you try it? What did you enjoy about this editor?
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 J
or 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.
2 Likes
Was a vis user for a while before I found about kakoune.
I think the idea is great and I really love the Structural Regular Expressions but, sadly, the editor feels quite incomplete. I find it as a good improvement from vim (aside from plugins and complex behaviors) but nothing near kakoune. By leaving behind some vim behaviours (order change, visual feedback, external tooling instead of built it) it improves a lot of stuff I never liked from vim. Vis tries to do some stuff but it stays more loyal to vim’s principles than it should.
I did love some things about vis, though. Their LUA API is great and simple to use and the highlighters are very good (I find them better than kakoune or vim ones). The code simplicity is also good as it’s an extremely light editor that starts up almost instantly. Additionally, it has some functions that I have not yet found on kakoune (but have been extremely lazy to find them, as I use them sporadically) like running an interactive command (!), inserting digraphs () and some other stuff I don’t even remember right now.
Overall, I think it’s a good theoretical editor but hardly a real world one.
1 Like