is "vi" worth learning in 2022?

vi isn't a good editor. Unfortunately, people still use it because "it has always been there".

In my opinion, vi and its sources should be put in a museum as an example on how to not write an editor.

There are much better ones to use. nano is such an example.
 
If Multi-Edit was cross-platform I would use it. But I need cross-platform editor. I have tried many cross-platform editors. One of the best is fte. But in the end, I chose vim. And not because it's always here, but because it does everything that I need to work.
 
<nitpick> please supply an example of upper case numbers, WITHOUT referencing xkcd. </nitpick>
;)
UPPER CASE: I, II, III, IV, ETC. ...
lower case: i, ii, iii, iv, etc. ...

cased_numbers.jpeg


This is what I learnt when I became interested in typography a number of years ago.
Almost nobody uses lowercase numbers, to the degree that systems such a LaTeX call them "old style numbers".
 
I heart vi :). It's always there and just knowing there are two basic modes - edit and commands and knowing q!/ZZ and :wq and hjkl for directional stuff is much easier than emacs squirrely key combos - is it CTRL-Q-C or CTRL-ESC-X while holding down the A key, I can never keep it straight. That said, I detest nano and it's prolly just laziness on my part - I'm sure it has rational nav keys besides the goofy arrows. vim's fine, but somewhat unnecessary once you get used to canonical vi. ed's ok and vi's built on ed, but it's clunky in its own way. However, for extensive copy and paste - I prefer kedit, kate, whatever editor cinammon comes with, gedit, leafpad, etc. Cutting and pasting in a console based editor is tricky business and hard to remember how to do properly.

edit: I should say marking text for copy paste is tricky... yanking and putting text is drop dead easy nyy and p :).
 
The striking highlight of this editor is its ease of use and minimal learning curve.
That’s not what I say when I try and use nano. But YMMV etc and there are plenty of choices so we’re free to use what works for us. Different people have different ways of working and mental models - there is no one true perfect editor. But to answer the OP’s question - knowing a little vi(m) doesn’t hurt. For every day use you might prefer something else.
 
If I don't know how to get out of a program, I usually try, in this approximate order: ESC, q, quit, exit, \q, \quit, CTRL-C, CTRL-D, CTRL-C 3 more times, out of frustration and an old familiarity with CTRL-C, then :q, then my old pal, the Micro$oft 3-finger salute ([ CTRL ] [ ALT ] [ DEL ]), then CTRL-C out of frustration again, then the power button if it's available to me. If I didn't already know about :q from frequent use of with vi and related *nix-like software, I might ask the question on some forum or another.

Everyone has to start somewhere and I'm glad older people gave me the slack to ask a lot of questions.
 
Ha.
Code:
man vi
... an editor that won’t let you edit an entire page without littering the screen with key mappings and cruft that are easily discoverable and learned is not easy to use it’s just got training wheels for tots.
That said to each their own. I disagree but can totally see how some folks (especially folks growing up with Windows) would like nano/ee/etc.
 
I would say, even learning the basic commands wouldn't hurt to know and isn't really any difficulty. Personally, I rarely needed to learn/use much more than write/save, dd to delete/cut, and of course paste and searching. Sure, vi/vim can be a very powerful tool that I barely scratch the surface of; in the end it is just another tool in the toolbox. Having the knowledge to comfortably use it, even basic usage is still worthwhile.
 
I have basic knowledge about VI. Well enough to edit config files in case I have to. I think basic knowledge about VI is a must on
any *nix system and the good thing is, it's always there when you need it most.

However I do not want to write a book with it or some program code. For that there are better tools out there.
 
I would be ashamed if a product of mine would need a thread on Stack Overflow on how to exit it.
I would be ashamed that I couldn't figure out the documentation or use Google that clearly states how to quit vi. This is child's play. 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. For that matter, how did they ever install or turn their computer on in the first place?
 
Sigh, stop being so grumpy. :) Haven't you seen everyone's first vi session? Let me find it, don't go away. Ah, here it is.

I think I mentioned the other joke earlier, but I can't find it online. Something to the effect of ssh-ing into a Debian machine, running vi sudo and finding yourself in nano. I guess Debian feels very tied to Gnu which is why they've made it default.
 
Back to the original question. vi is worth leaning because it is ubiquitous. It’s not simple, but it’s consistent and nearly always present. It’s unbelievably fast, even with unbelievably large files.

People who dis it because it has been around are naive, if not ignorant. It is very powerful and sophisticated - much more so than most fancy looking or modern editors. The UI appears antiquated, compared with this other editors, not through apathy or entropy, but by choice related to the vast number of users who know it and love it as it works today. Whereas some projects could care less about backward compatibility this is not the case with vi/vim, thankfully. What newbs and casual users often fail to grasp about vi is that it works. Period. Not that it kinda works, does some of the stuff right, some of the time. If you take the time to learn it, it can do practically any editing task that’s possible (I say this with the expectation that there may exist some capability it lacks that I don’t know about, but so far as I know it’ll do anything)!
 
Back
Top