is "vi" worth learning in 2022?

You really think your hand-crafted text editor would overthrow?
What is that even supposed to mean?
I personnaly depend mostly on short keyboard delays. What editor it has to be isn't so relevant.
Still, I see no advantage of using the vi-family to edit files. It's only a low-level standard for in a limited environment.
 
I have a bit of a love‑hate relationship with vim(1).​
  • […] 300 documented keyboard sequences to edit a line of text […]
    Even after 15+ years of use you learn new keyboard combos meaning you have been doing it wrong all the time. For example, there is */# “search current word” (forward/backward). All those years I did /word and n/N. Now I feel stupid. On the other hand, now I can’t live without this function anymore.​
  • The assumption that everybody used a US keyboard mapping so that h (←), j (↓), k (↑), and l (→) are on the right‑hand home‑row is wrong – these mappings are useless to me. Similarly, that everybody spoke English: change, insert, next, paste, word etc. This design impedes seamless internationalization. At the same time – as it has been mentioned before – lots of actions can be achieved with one or two keystrokes. That’s incredibly powerful.​
  • vi(1) is not to blame, but we’re stuck with editing a two‑dimensional matrix of character cells. Yes, it is the least common denominator, still it feels archaic from today’s point of view.​
Fun fact: In German there is the joke that vi(1) stood for „vergiß ihn“ – “forget him [= it, the editor]”, implying it was a useless editor.​
 
What is that even supposed to mean?
  1. Post 762017: You mentioned people could write their own hand-crafted text editor
  2. Post 762027: I stated that it wouldn't overthrow vi/vim
  3. Post 762028: You stated I was exaggerating
  4. Post 762029: I pushed for you to clarify why you felt I was exaggerating

Still, I see no advantage of using the vi-family to edit files. It's only a low-level standard for in a limited environment.
Many don't see the advantage. Many do see the advantage. For many a compromise is to use a vi/vim style plugin for VS, VSCode, CLion, etc. Its basically a gradient.

Though don't underestimate how many people do need to operate in a limited environment. Work via tcp/ssh or even serial/cu alone are common use-cases. With the weakness of Wayland's design for remote desktop, I could even see this growing.
 
In a 21 page thread, I'm sure it's been mentioned already, but aside from everything else, vi key movement defaults are used by lots of other programs. The dwl window manager, mutt, w3m, for example.
 
It's only a low-level standard for in a limited environment.

This is not a LIMITED ENVIRONMENT issue. This issue has to do with the longevity of AT&T, *BSD, UNIX and Linux systems as compared to other operating systems.

The actual issue is that you can TODAY (in the year 2026) still login to and use older release UNIX/Linux systems that were created and deployed decades ago. When you do that you are living in the past and you have to work with the way things worked in the past. vi(1) and (maybe emacs(1) ) existed in those days and there is a high likelihood they are going to work.

Many of us like going from the past to future with as many things being/working the same as possible because it makes it easier to support the operating system.

Glad your "AI" will always create a custom, flawless, working editor for you on-the-fly -- good luck with that :cool:
 
This is not a LIMITED ENVIRONMENT issue. This issue has to do with the longevity of AT&T, *BSD, UNIX and Linux systems as compared to other operating systems.

The actual issue is that you can TODAY (in the year 2026) still login to and use older release UNIX/Linux systems that were created and deployed decades ago. When you do that you are living in the past and you have to work with the way things worked in the past. vi(1) and (maybe emacs(1) ) existed in those days and there is a high likelihood they are going to work.

Many of us like going from the past to future with as many things being/working the same as possible because it makes it easier to support the operating system.

Glad your "AI" will always create a custom, flawless, working editor for you on-the-fly -- good luck with that :cool:
AI? I'm at least not stupid enough to use some always-online system that tries to benefit of my text. That trend is 1 of the dumbest ever.
I just don't like invisible things happening. That was usual in a time where computers and particularly terminals had limited capabilities and resources for a complete feedback.
There's nothing left of that now. Last time I used vi was on a serial termianl. Same problem of not having modern capabilities. NetBSD kind of enforces it. You have to edit the package server url in your shell profile with vi to be able to install a differennt editor.
 
Even after 15+ years of use you learn new [...] Now I feel stupid.
Nah! Don't be so hard on yourself.
That's just the process of learning while you are getting better. Quite normal. Nobody starts perfect.
In contrary: The more complex something is, the more features/options/ways to do something it has, the higher is the probability one day you will learn another, better way to do the same thing, and then realizing, '...if I'd known that before.' Well, yeah. But many of such things are nothing to be teached to a beginner. You need to be a bit advanced - mature, if you will - to learn even better ways. To stay in the example: Look at somebody start learning vi[m]. This person needs to learn a bunch of single characters to even do something at all with this texteditor. So, instead of teaching this already overchallenged person even more single characters at the beginning, you'd better give some other ways first. The shorter, quicker ways can be learned later, when the basics are already muscle memory.
And it's always worth to take a peek into the HB once in a while, to learn new things. 🤓
(And it also depends on the source you learn from. What you mention comes pretty early in the book "Learning the vi and Vim Editors". Anyway: Different ways of learning. And Vim is by far more complex than vi.)

but we’re stuck with editing a two‑dimensional matrix of character cells. Yes, it is the least common denominator, still it feels archaic from today’s point of view.
:-/
2D is more kind of an unavoidable side effect, an accident caused by technical reasons. In fact those are even more archaic only 1D arrays of characters really. But unless it's some kind of a live ticker a line has to be broken at a certain length for to get reasonable formats that can be handled in a real world.
But seeing the vast majority of people is already completely overchallenged reading only one page of 2D texts the size of small book formats, and their numbers are growing even faster, since smart phones, social media and AI relieve people of reading, writing, communicating and thinking, I wonder how many geniuses will be left, capable to deal with a 3D "matrix of character cells":
3d_code.jpg

And 4D - even less archaic, even more modern, would mean the whole text is in motion all the time, characters permantely swap places? :-/
I don't know how smart you are, but I admit, I am way too stupid for that. My faculty of understanding is just quite sufficient enough to halfway deal with 2D texts. And there is still more to learn about those than my life time was enough for. I'd rather stick to those, thanks.
 
MG you are trying to compare vi with graphical editors as if they both have the same goals and capabilities. Graphical editors fall down with the needs of there's where vi shines and runs rings around it. If I'm editing a document for publication I'm not going to use vi in misty cases (though one can and I have). Likewise one would struggle setting up a server or initial installation of many systems using libre office or msoffice.

But not learning vi is not learning the fundamentals of Unix operating systems which eventually rear their head

Mathematicians still use chalk and pencils
 
MG you are trying to compare vi with graphical editors as if they both have the same goals and capabilities. Graphical editors fall down with the needs of there's where vi shines and runs rings around it. If I'm editing a document for publication I'm not going to use vi in misty cases (though one can and I have). Likewise one would struggle setting up a server or initial installation of many systems using libre office or msoffice.

But not learning vi is not learning the fundamentals of Unix operating systems which eventually rear their head

Mathematicians still use chalk and pencils
Not graphical but fuilly visual. I almost always use ee for anything. It doesn't copy lines out of view like mousepad, that I rarely use to avoid that.
I could make an editor that does everything I want but that's too specific and a waste of time, as well as learning the operation of any editor from documents. There's no solid motivation for the effort.
 
But not learning vi is not learning the fundamentals of Unix operating systems which eventually rear their head
Note that I have used vi since 1981 and still it is my primary editor but one can learn the fundamentals of Unix without vi just fine. Recall that Joy created vi in 1977 and it first appeared (as vi mode in ex) in the first BSD in 1978 -- the Bell Labs guys continued using ed for much longer. In fact vi really has not much in common with the Unix philosophy or fundamentals.
 
Recall that Joy created vi in 1977 and it first appeared (as vi mode in ex) in the first BSD in 1978
In terms of user-facing experience, I feel ed -> vi is what separates traditional UNIX from modern UNIX.

Where vi is still very "UNIXy" by design is that it doesn't do much, instead it provides just the editing tool and for most other tasks, you need to pipe the contents through filter programs (i.e fmt). Its the interop with small, simple, standalone programs which is the general ethos of UNIX.

Of course vim is a different beast. The typical open-source bloat is continuing to hit that. DSL/scripting layers alone generally means it grown beyond a UNIX design.
 
Where vi is still very "UNIXy" by design is that it doesn't do much
It does a *lot* more than ed! And you can get by without knowing many vi commands. A friend never learned advanced commands of vi & he would use "xxx...x" to delete whole bunch of words instead of "<n>dw" or "dt<char>" or something more efficient. Not even the dot command! I could never watch him editing!

It used to be that you had to know ed(1) but now usually even the single user bootup environment is much richer.
 
In terms of user-facing experience, I feel ed -> vi is what separates traditional UNIX from modern UNIX.
I mean... you're going back a very long way. Vi has been around in mainstream unix since 1979 according to this https://en.wikipedia.org/wiki/Vi_(text_editor) ... so that's 47 years. Yes I remember my very first introductory lessons on unix were on a pdp 8 that only had ed, not vi, and it was pretty painful. But I think I'd call vi a pretty traditional part of unix by now. :-)
 
Traditional, yes. Fundamental, no. You can get by perfectly without knowing vi. And the orig. vi is pretty much gone now. It is now nvi on *BSD, vim on Linux.
I guess so, although they included vi in posix. It would be pretty grim if you were stuck with only ed again!
 
I mean... you're going back a very long way. Vi has been around in mainstream unix since 1979
True, it does seem quite funny to write considering its age but I still would call that era of UNIX 'modern'.
Much of the userland was in place and its when the industry started to get interested and ultimately standardized (SUS) rather than remain academic.

Likewise the 90s was just the era of rebranding. And then all of the fun stopped ~2000 when it became the era of the clones.
 
Back
Top