I do hate the VI editor
Yes, dislike is a word that is not strong enough.
There is not a piece of software on the planet that has been more pain to use to me than the fabled VI editor. Fabled, because at this point it is as fabled as a shining knights armor sitting in some museum. Fabled as in ancient, incredibly old fashioned and not to be used anymore. Don’t get me wrong: I don’t want to stop people from using VI. If you love it and spent your 40 hours of training how to use it, go knock yourself out. I know, you will be faster in text editing than anybody else. You will be happy on any old Unix (that is so old or dated, it starts to smell ;-)
But please please please don’t think that other people should be indoctrinated or convinced to use VI.
I myself have chucked Linux into the corner in 2001 when confronted with this P.O.S. software. And of course, some not so bright person in a forum could not relate to being in the 21st century and other people that do not want to do serious and time consuming training to use something as trivial as an text editor. He recommended me to use VI to edit a text file in Linux, at which point I was astonished, flabbergasted and then well, angry at the idiocy of VI, where you even need to read a manual to be able to exit the damn thing.
Imagine going to a building and entering and then walking around and suddenly getting lost. The doors are all unmarked, nobody helps you and then you realize that you are in some strange building that was built before labels and directories or even maps were invented. And you should have (of course!, *dripping sarcasm*) studied the manual for that building before entering. Now you are trapped and all you hear from other people is RTFM!
Strange? I think so.
In my book, ANY application, no matter what it does must at the very least show you the way out, so that you can use that in case you decide that you do not want to use it. And every software does it, just VI does not.
And how do you get out of VI?
Well, first you exit edit mode with ESC (yep, you’re actually not always in edit mode, so you even have to know how to make your keystrokes register when you type text ;-)
then you use the combination :q! for quit and really do it.
:wq! is for writing the file first. Guess how much time you save just having to type these few commands (*dripping sarcasm*) and well, guess how long it will take you to memorize them properly ;-)?
So in my case I had to terminate the editor from outside, I sent it a sigterm or sigkill, which is the worst defeat that can happen: I had to actually “call security” (in an OS sense) and remove the damn thing (akin to a contractor that refuses to leave after a job is done, citing that you do not know the magic password that he requires).
Now why am I so angry at VI? Well, because there are tons and tons of better editors out there. Take emacs for example. No, I am not somebody that loves emacs. I am not part of that flame war. Why do I prefer emacs to VI? Well, it got this crazy new invention (I think that was invented in 1984) called MENUS *dripping sarcasm once again*, where you can actually know what options there are, intuitively. without reading some blasted manual beforehand. Exiting that program is so easy, saving is easy, loading is easy and there is even a built in help.
Nano as an editor is also OK, as you see what you can do below in a line and well, it also talks with you, telling you high tech shit like “do you want to save this? If not, you will lose it”
I estimate that VI is responsible for more people chucking Linux into the corner after wanting to try it than any other thing. I remember using Windows and realizing that DOS was over, gone, bye bye, that the future was GUIs. When using Linux the first time, I wondered if the thing was not outdated. All that focus on the CLI seemed a little weird. It seemed to me that there were some geeks that were just having a private party, loving the little world they had created for themselves, requiring in depth skills for doing trivial things that other non trained people seemed to do with a few clicks on Windows. But in their world, people had to conform to their rule: “RTFM! Intuition does not work, nope you cannot just use that and figure it out as you go!” they seemed to say. And when meeting VI, I have had it. That thing was ugly as hell and old as well, before the beginning of time.
Only later I recognized how great the CLI is in Linux and that it can do things that you just can’t do on Windows, because DOS is really over: it is a cheap, copy-cat P.O.S. copy of Bash or any Linux shell.
BUT: I had to get around VI. Every time I used it again, it drove me nuts. And then I had to do my RedHat Certified Engineer certification. And when asking if I could use any editor to edit conf files, the teacher (a former Unix pro) said “sure, you can use anything you like, but you will find that only VI is installed all the time on all systems”
So he told me in no uncertain terms “yes, use any editor you like, BUT NOT IN MY DAMN CLASS YOU WON’T!”
The “vi is installed everywhere, others are not” excuse has been used now for 30 years and it is getting old. On systems with gigabytes of ram, terabytes of hard disk space a CLI text editor, even something as large as emacs is tiny and the problems a tool causes and man hours it wastes by not being available is much worse then the few megabytes it “wastes” by being ready and installed.
This insistence and the old fashioned (dinosaur-like) thinking is very prevalent on Unix systems and “Unix experts”, even nowadays. And it is the main cause for Unix to be supplanted by Linux for decades now. When you compare for example top (ancient) and htop (new and improved) you can see this difference very much: top has not changed for decades, while htop has a lot of great new ideas and does whatever top ever did: use of colors, using bars instead of numbers, use of cursor keys to navigate around.
Oh, and on a side note: I have to always laugh at that, but did you know that some VI version don’t even support cursor keys? It is shocking, but true. And I chuckle, thinking back at probably somewhere in the 70’ies when cursor keys were the total new thing, high tech and had a WOW! factor to them, and only the fancy-shmancy keyboards had them.
So if you want to use VI, please do. But please don’t instigate that newbies do and don’t pretend it is all easy. It is not.
And did I learn how to use VI then? Well, faced with a teacher that basically told me in no uncertain terms that he would make me fail the test if I did not play by his terms and rules, I learned the basic VI commands. But then stopped and fought it. And still don’t know how to use vi properly and well, am proud of that and all the time I saved.
Nano and emacs are always installed in seconds, especially since all modern Linuxes support directly installing from internet with one command.
I love efficiency and making things more efficient. And the command line has some things that no GUI can best. The power to script everything or automate everything.
But sometimes I am wary and take a hard long look at things: and if some schmo can do things faster in a GUI, that take me longer in the command line, then I am doing something wrong, am I to use the CLI in the first place!
annoyed
calm