vi isn't a good editor. Unfortunately, people still use it because "it has always been there".
Sorry, but in this point I disagree with you.
You name all the points of someone who fumbled around a bit with vi,
presumbly when being forced to used it (while under stress within a emergency situation [Linux]),
cursed loudly and a lot (I felt the same way many times)
...decided to hate it,
and that's it.
But never really got past the hurdle,
grasped its true concept.
I bet if you did you'd talk otherwise.
Okay, vi needs two things to get through to it:
- DON'T compare vi with any editor you've learned before. Start fresh all over as you never used any texteditor before.
- Practise. You'll need at least a couple of hours, biting bullets (cursing is permitted [see 1.] as using backspace and cursorkeys (Vim and neovim) for the beginning. Don't stick too strictly to the tutorials! Use ZZ to leave the editor, not :wq
A Formula-one is no mobility scooter.
Even as an experienced driver you have to practise.
And of course, it's absolutely up to you, to rate if it's worth the effort.
Only you knew the amount of textediting you have to do.
Learning vi only pays off in the long term for someone really doing large amounts of textediting.
For anybody doing just smaller or medium amounts of textediting I wouldn't recommend to learn vi.
Under some commercial Unix or Linux have a cheat-sheet ready, because vi may be the only editor available in some situations your system doesn't fully boot.
Within FreeBSD you don't need on.
Under FreeBSD vi is always available, but by system's default settings FreeBSD's basic editor such as for emergencies is ee ("Easy Editor")
It's small (and slow), but self explaining by having the help always online.
It's good for small editing tasks like commenting a line within /boot/loader.conf that prevents your system from fully boot, and you don't know vi
Btw:
having the handbook/help/command's explanations always visible is very helpful, but neither intuitive nor efficient.
I would be ashamed if a product of mine would need a
thread on Stack Overflow on how to exit it.
An old vi joke:
"How to produce a random file?"
"Set someone who never used it before infront of vi and ask him to leave the editor."
ZZ - don't need a thread for that.
When unsure hit Esc - that always brings you back in editing/command mode.
It is.
Don't confuse things.
Intuitive means how to create new things by successfully guessing and combining things you've already learned,
and not "avoid learning."
Once you grasped the concept of vi - and yes, you need some training to do so -
vi is very intuitive and very logical structured.
That's why I told the example with the romans alphabet.
If you do not know the signs and how to combine them to words, it's just chaotic rubbish to you, seems to be the total opposite of intuitve.
But once you know all 26 letters and learned to combine them you can write anything with them - very intuitive.
The
core problem most people have with vi is the two modes of editing and entering text are seperated,
while within other editors they are always avaible at the same time.
The reason is:
Most of the time you're doing more editing than entering text.
That's why vi starts in editing mode.
Starting in textenter mode would make sense, if the most tasks someone does were producing new files.
(You see: vi is finetuned to spare even the lessest superflous single keystroke.)
While in
texteditors with both modes combined (most) the editor has to distinguish between text and command.
That's why commands usually done by combining special keys with other keys.
You also have to learn those. Otherwise you stick with GUI's menus, making mouse-kilometers, which is editing at snail's speed.
And even if your learned those, in all other texteditors I know you cannot guess commands or combine those - you just depend on pure rote learning.
That's not intuitive.
When you have a
seperate editing mode, you don't have to distinguish every single time.
Then single keys become commands.
That's much less typing, thus speeding up the process significantly.
They can easily be combined to create whole command-chains.
This way you don't have to check your long list of rote learned editing commands, their according keystrokes, and how to do them in which order to reach the editing task.
You "program" your own editing command for the very editing job you're currently want to do every time
tailored exactly to the point.
Of course, I admit,
this requires thinking while editing,
and doing a bit math in your head is also very helpful.
(I recommend to have line numbering activated by default.)
But if you have no problem with mental arithmetics,
and willing to bite bullet,
once grasp and loved Vim's and neovim's concept of registers and macros you will agree:
Vi is not outdated.
Its concept is timeless, and almost ingeniuos (at least for people who prefer thinking above rote learning
)
Vi is very powerful.
Vi is very intuitive.
Vi is very efficient.
Vi is editing at max-speed.
You may say:"I don't like vi", "it's complicated to learn", "its usage is strange/very special - nothing for everybody" or "to me vi is no useful", even "it may not worth learning" (depends)
but you cannot say "vi is outdated" or "bad."
Because that's simply not true.