is "vi" worth learning in 2022?

Vi and Vim use curses. Its ed (or ex) that you would likely need to be using for your ancient 80x25 hardware terminal.
That's kind of the point. If you have curses, you don't need an editor with hidden states and 300 documented keyboard sequences to edit a line of text. I know better things to remember.
The idea of vi in UNIX systems is to provide an editor that works under as much as possible hardware combinations but that doesn't make it efficient for everything. Only when nothing else works.
 
MG your statement is both exaggeration while also pointing to the advantage of vi and why all professionals know and use it.
No doubt about it, but it's only an editor. I use it when there's nothing else. Last option because I prefer to see what I do immediately and the technical limitations that could make that a problem were common 40 years ago.
If I was stuck with a post '90s system with only vi, I would write an ncurses editor with the same keybindings as ee. 😆
 
I found it amusing when the Reddit Moderator Guy tried to put in a PR to change the FreeBSD shell default editor to easy-editor from vi.
Can / would you elaborate on this a little more? Because it seems you hit a nerve and now I'm very curious about this ;)

(edit)

To also stay a little bit ontopic here... I'm still using vi on almost a daily basis; and not just the editor. Because I enjoy the focus on keystrokes to "do" things I even enabled vi mode in my (KSH) shell. So if I press escape on the console then, yups: vi mode gets activated and I then use the "vi keys" to go through my history (or use / to do a quick search).

Pretty useful IMO.
 
The idea of vi in UNIX systems is to provide an editor that works under as much as possible hardware combinations but that doesn't make it efficient for everything. Only when nothing else works.
Each to their own, but I find vi quite efficient for the things it does. Not to mention that I think your comment is a little funny, because it makes me recall WordPerfect 5.1; that was also fully focused on keyboard shortcuts and sure enough, people said the same thing.

Thing is: just because you don't think something isn't efficient (which is a fair claim!) doesn't mean that this is actually true. I've used vi for... I think ever since '98 (or something close enough) when I got my certifications for Sun Solaris, and it's still my to-go-to editor whenever I'm on the command line (which is almost daily). Curses or not, I only use vi, and sometimes vim whenever I need to edit & compare 2 files; then having a dual pane is easy.

Point being: I can pretty much do anything I need or want. Looking up words, search/replace, going to a specific line, copy/cutting. And all those functions without having my hands ever leave the keyboard (to grab the mouse or try to access menus), which I find very efficient because it allows me to keep my focus and continue typing ;)

(edit)

No doubt about it, but it's only an editor.
You never lived the "vi vs. emacs" wars I guess? ;)
 
Back
Top