Interestingly, #FreeBSD comes with #nvi2 in base, while #OpenBSD and #NetBSD seem to be running #nvi 1:

FreeBSD 14.3-RELEASE-p12 ~ ~ ~ Version 2.2.2 (2025-10-08) The CSRG, University of California, Berkeley. OpenBSD 7.3 (7.9 is still running the same version) ~ ~ ~ Version 1.79 (10/23/96) The CSRG, University of California, Berkeley. NetBSD 10.1 ~ ~ ~ Version (1.81.6-2013-11-20nb4) The CSRG, University of California, Berkeley.

They all seem to have nvi2 available as packages, though, which #Debian, oddly, does not.

rld@Intrepid:~$ uname -sr FreeBSD 14.3-RELEASE-p12 rld@Intrepid:~$ pkg search nvi |grep '^nvi2' nvi2-2.2.2 Updated implementation of the ex/vi text editor rld@Intrepid:~$ #(searching openbsd online) rld@Intrepid:~$ searchall -o nvi |grep ^nvi nvi-2.2.2 (list) with wide and files limited by nvi-2.2.2-iconv (list) with wide and files limited by [email protected]$ uname -sr NetBSD 10.1 [email protected]$ pkgin search nvi |grep ^nvi |grep -v nvidia nvi-1.81.6nb13 Berkeley nvi with additional features nvi-m17n-1.79.20040608nb11 Clone of vi/ex, with multilingual patch nvi2-2.2.0 Multibyte fork of the nvi editor for BSD [email protected]$ ~ $ head -1 /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 13 (trixie)" ~ $ apt-cache search nvi |grep -E '^nvi2? ' nvi - 4.4BSD re-implementation of vi ~ $

@rl_dane

There appears to be no "standard" vi. I kind of like discovering the little quirks on something small enough for me to still wrap my head around.

@RussSharek

I think whatever patent-encumbered version that came with the old BSD Unix was probably considered the gold standard, and nvi1 is supposed to be a close approximation.

@rl_dane @RussSharek You can use the original. https://ex-vi.sourceforge.net/

That Caldera license might be considered sketchy these days, I'm not sure.

nvi2 was done by different people, iirc, so it's not a "direct successor" to nvi. Just another improved version.

The Traditional Vi

Traditional vi text editor

@netbsd @rl_dane @RussSharek Otherwise the one present into illumos (usr/src/cmd/vi) seems to be Copyright University of California Berkeley under BSD-4-Clause plus Copyright Sun-Oracle under CDDL, which can be another option.

And well there is a standard vi in terms of interface: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/vi.html
vi

@lanodan

To be fair, they're more like guidelines than actual rules. In all my testing of vi clones over the years, I've only ever encountered one that implemented :open mode (I forget whether it was Stevie or Elvis) as prescribed by POSIX standards¹ 🤷

@RussSharek @netbsd @rl_dane


¹ https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ex.html#tag_20_40_13_29

@gumnos @lanodan @RussSharek @netbsd

I'm thinking of trying elVIs again, since nvi doesn't have word wrap, and (neo)?vim feels like such overkill.

@rl_dane @gumnos @[email protected] @netbsd

I have line wrapping in both vi and nvi. Only time I didn't was when I cribbed a config which disabled it via `set leftright`.

Am I misunderstanding what you mean?

@RussSharek @gumnos @netbsd

I mean word-oriented wrapping.

This:

I am the very model of a modern major general

vs this:

I am the very mod el of a modern major general

@rl_dane @gumnos @netbsd

Oh, yeah.

That's fancy stuff. :)

I've been writing with semantic line breaks recently, so the issue sort of resolved itself for me.

@RussSharek @gumnos @netbsd

That's been recommended a lot to me as well. I'm going to try it. ;)

@rl_dane @gumnos @netbsd

I was surprised at how much it helped me, despite having slid off it some years ago.

@RussSharek

I was amused recently that the old-school line-mode browser¹ maintains internal line-breaks in HTML source code where most browsers collapse them as a generic run of whitespace as if it was a single space…so it revealed that my blog's SSG emits HTML with my underlying sembr linebreaks in tact 😆

@rl_dane @netbsd


¹ https://www.w3.org/LineMode/

WWW - The Libwww Line Mode Browser

@rl_dane @gumnos @lanodan @RussSharek @netbsd
Be an adult and use ed(1) like the rest of us.

@jbowen @gumnos @lanodan @RussSharek @netbsd

I'm moving towards it. I've learned it decently well now (much simpler than I realized), but I do miss some creature comforts from vi. ;)

I mean, the fact that I've gone from neovim to nvi must count for SOMETHING, right?!? XD

@rl_dane @jbowen @gumnos @[email protected] @netbsd

I learned a lot about vi by learning my way around ed.

@gumnos @RussSharek @netbsd @rl_dane Yeah true, it's why I often describe POSIX as comparable to a dictionary.
Although it seems like ex(1) in Solaris 10 and 11 supports :open mode as specified.

Although to be honest while I'm familiar with vis/vim and ed(1), I'm not really familiar with original vi(1) or ex(1), so could have missed a detail.
To add Slackware to the list: nvi 1 (1.81.6) was added to -current(15) on Mon Jan 13 00:11:55 UTC 2020, replacing Elvis as the default /usr/bin/vi provider. It shipped in stable with Slackware 15.0 (Feb 2022). It recently merged the Debian patchset, so Slackware and Debian now share most of the nvi 1 fixes.

One nice detail: when nvi was introduced, Elvis was rebuilt to drop its /usr/bin/vi and /usr/bin/ex symlinks, and nvi only provides those symlinks if no other editor already does.

I just added an "NVI ACROSS UNIX SYSTEMS" section to some notes I keep, if anyone's curious:
https://repo.or.cz/code-notes.git/blob_plain/HEAD:/notes/NVI_Editor_Guide.txt

#nvi #vi #slackware
Making sure you're not a bot!

@r1w1s1 FYI xvi is smaller than nvi. https://martinwguy.github.io/xvi/. I haven't benchmarked its speed though.
xvi

@mathew @r1w1s1

Also builds on termux, btw.

@mathew @r1w1s1

Looks neat, although there seems to be no mention of license on the website or in the repo.

For micro visual editors, I was recently introduced to "eh:"
https://codeberg.org/SirWumpus/eh

eh

eh - Edit Here - vi(1) the good parts version is a minimalist version of vi(1). It is an example of the "Buffer Gap" method and supports UTF-8.

Codeberg.org

@r1w1s1

How does nvi compare to elVIs? I would've thought that elVIs was more featureful.

You're right that Elvis is more featureful in some ways, but the main thing is UTF-8:

nvi handles it properly and Elvis doesn't really. For a default /usr/bin/vi on a modern system, that matters more than extra features. That's likely the main reason Slackware switched from Elvis to nvi.
@rl_dane @r1w1s1 nvi is based on Elvis, and was improved. I've got a post about the vi family here: https://lpar.ath0.com/posts/2026/05/the-vi-family/ (It needs updating with links to forks and another tiny vi clone I've been made aware of.)
The vi family

The last text editor you’ll ever need to learn.

LPAR
Oh interesting, I'll check the post! And yeah, the nvi README actually credits Steve Kirkendall, Bostic started from elvis 1.8 to build a free vi for 4.4BSD. Funny that Slackware ended up replacing Elvis with what started as a fork of an early Elvis. Though they diverged a lot since — nvi added Berkeley DB backing for big files and went for bug-for-bug vi compatibility, while Elvis went the more featureful route.

CC: @[email protected]

@mathew @r1w1s1

Wait, vim is older than nvi? lol my world is shaking 😂

Great list!

@rl_dane Oh, it's worse than that. OpenBSD has its own fork of nvi, ported to non-BSD systems as https://github.com/johnsonjh/OpenVi, and there are two other forks I've encountered. I'm aware of three forks of original vi, all at different levels of up-to-dateness as far as things like Berkeley DB version usage, malloc usage and UTF-8 support.

I've submitted a PR to add one of the nvi2 forks to Homebrew: https://github.com/Homebrew/homebrew-core/pull/284093

The fork of vi I've managed to build and run on both macOS and Linux is https://github.com/edeemer/ex-vi — it requires adding a #include for ioctl to a couple of C files on macOS and setting the Makefile to build with ncurses, but is otherwise straightforward.

I tried to get a more up-to-date version of original vi added to Homebrew, as the one there at the moment doesn't run, but got nowhere with the maintainers.

It looks like some folks started trying to consolidate all the different versions of vi, but the effort stalled: https://github.com/traditional-vi/meta/issues #vi

GitHub - johnsonjh/OpenVi: OpenVi: Portable OpenBSD vi for UNIX systems

OpenVi: Portable OpenBSD vi for UNIX systems. Contribute to johnsonjh/OpenVi development by creating an account on GitHub.

GitHub

@mathew

Did the original "developed-at-Berkeley-but-had-to-be-completely-rewritten-because-lawyers-are-jerks" "UNIX" vi ever get released as FOSS? ;)

@rl_dane Yes! The ex-vi I linked to has a Caldera clause in the license because it’s derived from UNIX® vi.

@mathew

"Heirloom vi" I absolutely love it 😄