is "vi" worth learning in 2022?

Oh dear god, there's even a Comic Sans Mono font. because who wouldn't want to use Comic Sans in a terminal...
There are also people using seriously sans serif fonts on multi long line texts.
And I've even heard of some may actually use transparency on terminal windows, running their shell and texteditor with complex backgounds.
If you don't get a headache by this you may have also no problem using joke-fonts within your terminal.

But seriously there are some good'n'useful fonts on this page, too.
 
%pupil -sceptical, when I was young (wipes away a tear), I got into using fluxbox with transparent terminals, with a decent background and, I think, a white font. But even then (by young I mean early 40's I think), my eyes couldn't take it while my really young friends (mid twenties) really liked it. Nowadays, though, I'm pretty standard, though sometimes I do like an amber on black, reminding me of my youth.
 
There are an incredible number of mono fonts around... but I always come back to Liberation, it's so clean. BTW, vi(1) forever! The "real" vi in the base system is really a plus of FreeBSD for me, I never got used to vim(1) and friends; maybe I'm just too old, who knows.
 
#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.
Agreed. Always there, on every Linux or Unix system. (And if you want to keep in practice when you are working on Windows, you can install GVim, though you have to remember that Vim has some commands that vi does not.) It's actually a quite nice editor when you learn it, but it is not terribly intuitive. It has a lot of commands that will speed up your editing if you know them, but lack of knowledge of them won't hurt you, especially if you are doing simple edits like config files.

If you need help learning it, O'Reilly has a book on vi: https://www.oreilly.com/library/view/learning-the-vi/9781492078791/

And for a continuously available crib sheet, No Starch Press has "The mug of vi", a coffee cup with basic vi commands listed on the side:

 

Attachments

  • 1723069181390.png
    1723069181390.png
    1.1 MB · Views: 45
  • 1723070911594.png
    1723070911594.png
    40.3 KB · Views: 28
That is an interesting aspect of UI design. For example, the most frequently used operator commands on the MVS operating system have single-character abbreviations: START (S), STOP (P), CANCEL (C), DISPLAY (D), HOLD (H), RELEASE (A), REPLY (R), HALT (Z), SWAP (G). It’s like they started using the first letter of the command, then, when there were collisions, some letter in the command, then just arbitrary letters.

The result is not intuitive at all. But the console operator who spends all day entering these commands soon learns the abbreviations and appreciates the reduced keystrokes.

Early newspaper editorial systems had keyboards with a bunch of keys for special editorial functions (TAKE, SEND, SPIKE) and typographical functions (QUAD LEFT, QUAD CENTER, QUAD RIGHT). I am told (no direct knowledge of this) that later systems dispensed with the custom keyboards because production users found it faster to use keyboard shortcuts than to move their hands off of the home row in order to hit one of the extra keys.

IIRC, one of the reasons Wordstar hung on for as long as it did was that power users liked not being slowed down by menus. I suspect that is why a lot of writers cling to Xywrite (https://xywrite.org/xywwweb/), another DOS-era editor.
 
That is an interesting aspect of UI design. For example, the most frequently used operator commands on the MVS operating system have single-character abbreviations:

Ah, the days of MVS/TSO. The same argument applies to XEDIT (the full-screen editor) and its brethren: The most
used commands were single characters, typed into the left edge of the screen (the line number column). Minimizing the number of key strokes was important for power users to be able to work fast. The same design principle went into what I consider to be the best text editor for CLI use ever written: Digital's EVE. The commonly used commands were control characters. The uncommon commands required reaching up to the "do" key, which was a large key right above the cursor keys, and typing a text command. Somewhat to emacs' Meta-X operation, which puts the editor into command mode.

This is also the design principle behind the most commonly used Unix commands being two-letter abbreviations: ls, rm, mv, cc, ln. I could add rn, and people who know how much time was wasted on NetNews in the 80s would laugh.
 
I think it's one of the great weaknesses of Linux that the man pages have been neglected in favour if the info(1) command which requires knowledge of the emacs(1) command set. Incomprehensibly stupid design...
Not if emacs is your begin-all-end-all point of thinking and interacting with the world (guess who I am looking at...). It's not one car on the wrong direction of the highway, it's thousands. And yes, info(1) is a rabbit hole not to jump into lightly.
 
if you don't know vi you can't merge files after a freebsd-update

Edit/check:
  • /etc/csh.cshrc
  • /etc/profile
  • /root/.cshrc
  • /root/.profile
After you get the vi stuff out, ee in: log out, log in.

In D36786, emaste@ wrote:

On a fresh FreeBSD 14.0 test install no EDITOR is set for root. I see setenv EDITOR vi in /root/.cshrc. New user accounts will inherit EDITOR=vi via
.profile from /usr/share/skel/dot.profile.
 
I never learned emacs.
Me neither ;)
I did.
Could have saved me a lot of time by learning vi[m] directly.

But I can understand some people feel the exact opposite way.
Both serve different ways of thinking.
emacs is for spelling bee lovers like to cram.
vi[m] is for engineers love to think. 😁

With vi[m] you cannot do shit without training.
You first have to learn the complete alphabet, all 26 letters before you even can start to write.
But then with vi[m] that's it.
Henceforth you ever become increasingly faster.

With emacs you can start to write without knowing shit.
But you start a neverending learning process.
To become as nearly as fast as some halfway trained vi[m] user you need to learn 260 letters (key combos) of the emacs alphabet, which contains > 2.600(?) letters... :-/
And you can never become as fast as you can be with vi[m].
(If your terminal, shell, and .vimrc settings are right to keep up with you 😁:cool:)
 
And you can never become as fast as you can be with vi[m].
So, are you throwing down a gauntlet here? I have no intention picking it up, but someone may. I'm the guy with the xdme reference card at the side line awaiting a good match.
 
I think it's one of the great weaknesses of Linux that the man pages have been neglected in favour if the info(1) command which requires knowledge of the emacs(1) command set. Incomprehensibly stupid design...
So freaking annoying when you get to the bottom of a man page and it says something like "By the way, this is likely all wrong and outdated. We don't maintain these anymore. The official documentation is published using GNU Info..."
 
In my anecdotal experience, it seems that the most of "This is in the info page" stuff comes at the beginning, not the end, of a typical manpage. But I could easily be wrong
 
Back
Top