is "vi" worth learning in 2022?

… my previous post, my original post, and my original question. …

If you haven't already seen it: <https://forums.FreeBSD.org/posts/631355> by dnb might be of interest.

Side note: Is it just me or does it seem like the same info is being posted over and over again in this thread?

It's not just you :)


It's this famous:


I've read things online about the inability of some to quit vi and it's the most ludicrous thing I've ever read.

How do such people even start vi when they can't even quit.

freebsd-update(8), amongst other things.

freebsd-update wants to merge files and you're dropped into vi.
 
Everything is easy when you know how to do it. (Not quite true, but a reasonable baseline). Vi is certainly not intuitive when you've never used it.

I've probably already linked to this in this thread but Everybody's first vi session still makes me chuckle. (Just the first line about everyone's first session)

 
There is some software I wanted to look at that only runs on centOS and RockyLinux. I had a box someone gave me so I tried to install Rocky on it and had all kinds of issues. I needed to edit some config files and immediately tried vi. It was available as expected. Worked as expected. And proved why the simplicity of vi should be learned in 2022...and beyond!
 
I think Vi is a good thing to learn as most Unix-type operating systems ship with it pre-installed or you can easily get it. A nice utility if things are broken.
 
#1 reason: it’s always there. Working on some embedded *nix? It’s there. Repairing a system? It’s in /rescue.

Do you need to master it, or use it as your main editor, no. Should you know how to use it enough to move around in a file, change something, and save? Yes.

True last year. True this year. Likely Almost certainly still true when someone resurrects this thread again next year. ;)
 
There is some software I wanted to look at that only runs on centOS and RockyLinux. I had a box someone gave me so I tried to install Rocky on it and had all kinds of issues. I needed to edit some config files and immediately tried vi. It was available as expected. Worked as expected. And proved why the simplicity of vi should be learned in 2022...and beyond!
Unfortunately, there is this abomination called “nano”, which frequently replaces Vi as the default editor on many Linux systems. I think at least on Ubuntu you need to install an extra package to obtain Vi.
 
Which only goes to show the quality of user on SO has degraded so low.
There is always a gap of intellectual capabilities between those asking for help and those being able to support them. Capabilities of humans are distributed like a Gaussian distribution.

You hardly can blame a place like a platform (like Stack Overflow or the FreeBSD forums) on the "quality" of people meeting there.

When talking about "quality of users" you need to define categories of qualities a person can have and how to measure a quality.

When talking about the quality of platforms degradation is a subjective perception for a number of reasons. People's vote can be seen on how often they visit a site. But on what do they vote? Do they visit because they are looking for good answers on their problems or are they trying to satisfy their regrettable need on lashing out on others?

There is a thumb of rule for real life:

If you are the cleverest person in the room, you are in the wrong room. For doing business the opposite is true.
 
Just my early-days (at 2.1.6-RELEASE or so) experience.
Not sure actual what was, maybe sysinstall or vipw, but something invoked vi for editing system configuration file.
At the moment, I was not at all familiar with vi and even don't know how to insert and/or delete texts, exitting, and everything else.
And worse enough, I even didn't know I can switch vty with Alt-Fn.
So I must rush to bookstore to seek and purchase printed book for vi.
It was MANDATORY. This was what I could know that I must type "i" to insert text. And much later, I noticed I can switch vty to read vi man page and back.
It was toooooooooo late.
This is why I recommend defaulting ee as editor.
ee shows key references at the top, and tells pushing ESC should invite me to its menu, and the menu tells me how to exit.

I agree with learning vi is good for unix-like OSes, but it should not forced as first-time editor, with my experience above.
 
While flipping between windows - due to muscle memory - I often give the wrong command to save. On vscode, jucipp and the micro editor (and other apps as well) - you type control-S to save. This has a different effect on vi. vi stops writing characters to the screen. Typing control-Q fixes this but it often takes a me a few confused seconds to realize what I've done.

On the other side, I sometimes type 'i' or ':x' in the middle of a document that is definitely NOT open in vi. This isn't any editors' faults, it's just what it is.
 
No, it's called "hand holding".
If one can't figure out vi, one shouldn't be using a computer at all.
Now that, I disagree with. I do prefer editors/nano, so I made a note to myself to install it first onto a bare FreeBSD install.

I can figure VI out - I've been in plenty of situations where VI was the only text editor really available to me. I just google for a VI cheat sheet that I constantly refer back to while fixing my own blunders. I had an instructor in college who liked to say that rather than knowing the correct answer, it's more important to know how to find the correct answer. His class was not even my favorite topic (I don't like accounting), but the guy was a pretty good teacher, and those words kind of stuck with me to this day...
 
This is why I recommend defaulting ee as editor.
ee shows key references at the top, and tells pushing ESC should invite me to its menu, and the menu tells me how to exit.

And on exit, it's quite clear about whether or not to save the file, if modified.

vi purists will be horrified :)

I agree with learning vi is good for unix-like OSes, but it should not forced as first-time editor, with my experience above.

Agreed. On 12.x at least, sadly there's no /rescue/ee .
 
It would be nice if vi and its variants support direct editing on startup and go back and forth between legacy vi mode and direct editing mode.
vi already support (at least on terminals for xorg) cursor movement by cursor key.
Direct editing mode should better supporting ESC menu like ee has.
 
I don't think arguing about text editors is very useful, so I am not really getting involved. Vi/Vim already won and will outlive us all.

That said:

go back and forth between legacy vi mode and direct editing mode.
I don't think "legacy" fits here. I know plenty of aging "legacy" editors on MS-DOS that have direct editing mode.

And as soon as Microsoft makes VSCode a modal editor, it will be seen as the most "modern" thing ever made and will be celebrated by the masses for the unbelievable innovation, expected from such a fantastic and forward thinking company that Microsoft is renowned for ;)

It's not just you
Some people evidently feel so strongly about this that they necropost a year old thread about text editors on Christmas eve...
 
Back
Top