In comp.os.linux.misc, rbowman <
bowman@montana.com> wrote:
On 15 Nov 2025 18:48:51 GMT, Ted Nolan <tednolan> wrote:
I find it takes a lot of munging to get vim to *really* work like vi.
:set compatible
does a very good job. It does leave out some of the bugs. The nvi implementation claims to be bug compatible, but then compare how
modelines work in Real vi versus nvi and you'll be unable to believe
that claim. I also don't think it supports "arbitrary ex mode command
in third column of a tags file":
tagname filename operation
Invoke a tag with, say, ":tag tagname" and then it opens the named
file and runs the operation. In defanged editors, the only operations
supported are movements, like a :linenumber or /search-pattern/. In
real vi you can chain ex commands to do things like
:1,20 w >>$HOME/.profile | 99
That's going to append twenty lines to the user's .profile and then
jump to line 99 of the file.
stevie / elvis / neovim / busybox vi / ... are at best vi flavored editor.
The one on FreeBSD which I think is technically "nex" is much closer out
of the box.
nex / nvi are the same, right?
:he compatible has the disclaimer
When this option is set, numerous other options are set to make Vim as Vi-compatible as possible.
The Arch vi is the real thing. I've no idea what version it is because
real vi doesn't do --version or much of anything useful.
In vi, the standard way to get the version is with ":version". It looks
like arch is using Heirloom Vi:
https://ex-vi.sourceforge.net/
That is a port of old code with many multibyte (eg UTF-8) fixes. It
should work with hardcopy terminals, which a lot of other vi
implementations (including vim) will not do. Those others expect you
to use ex mode on hardcopy terminals.
I learned vi on Digital Unix, A/UX, HP-UX, SunOS 4, and Solaris
2.(various), but I dabbled in vi clones for a long time, and was using
vim back in the 2.x versions. Elvis is still the default vi in
Slackware, and I've used recent versions of elvis for that reason. nvi
is default on NetBSD, and probably that FreeBSD one mentioned above. I
use NetBSD regularly and other BSDs very rarely.
In the vim distro there are sample macro packages. The ones to run
Conway's Game of Life were written by me on a Solaris box. The Solaris
vi can run them, but eventually it crashes out because there is a bug
that makes real vi (at least real vi of that era) forget marks after a
while. Vim will just work. Neovim fails to even start.
On the Debian system I'm working on right now those macros are in /usr/share/vim/vim90/macros/life/
Elijah
------
admits elvis is a pretty good vi imitation, but still not perfect
--- PyGate Linux v1.5
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)