3 ms·
Even the “vi compatible” mode in Vim does things quite differently. If you want something closer to the original Vi experience, the lesser known “nvi” (not to
by hnfong 3y ago
Even the “vi compatible” mode in Vim does things quite differently.
If you want something closer to the original Vi experience, the lesser known “nvi” (not to be confused with “nvim”) follows the original UNIX behavior much more closely.
It seems to be the default in BSD and some Unix distributions. Last I checked 10+ years ago Debian shipped its base system with nvi. Many many years ago (20+) I actually used nvi in a programming competition because the only alternative was a horribly buggy IDE thing (the host organizers was trying to switch from windows to Linux as the default env but a bunch of support wasn’t quite there yet). nvi is actually quite usable as long as you’re not too deep in the Vim-isms
- riedel 3y agoTo add to war stories: actually knowing vi commands saved my life once because I could not mount my file system (can't remember why) on my bsd and I only had access through a serial line terminal. Basically I figured out that ed was the only thing usable and it basically has the same commands as vi with the big difference that I could only effectivly look at one line at a time. Using a dumb terminal was quite an experience (the vt520 I used on the port actually supported much richer interactions). It was the one instance when I suddenly understood why also vim commands worked how the do (I think I am using vim since the old Amiga days and therefore never considered another editor due to my muscle memory).
- gpvos 3y agoNot a true war story but I used to use "open mode" in vi a lot when on a 1200 baud modem. It's like a line-based visual mode; if you have a smart but slow terminal, you can move around in the current line with h and l etc., but when you move up or down a new line is printed and you move within that line now. The i, a and c commands work more or less as normal. A few times I got into open mode in a dumb terminal, which is an even more special experience: vi will print backslashes when you delete characters and you have to count them yourself (I may misremember things slightly here). You enter open mode using the :o(pen) command. Later I discovered that you can use visual mode with a small number of lines (:set lines), which was much more pleasant. Also I got a 14k4 modem which solved most other problems.
- em500 3y agoMost mainstream Linux distributions (including Debian), as well as macOS use vim as the default vi. As you noted, the BSDs still default to (n)vi. Another place where it vi (not vim) is still used is in embedded systems and stripped down/rescue/installation, which often use Busybox (which includes a vi implementation).