is "vi" worth learning in 2022?

Are ee users the type who can't memorize commands?
That's not my point.
My point is that if vi is the default and newbies who does not at all learned about vi attempted to install FreeBSD, or worse, newly assigned to manage already configured but EDITOR=vi computer, anything need editing should call vi, and the person doesn't know "I can start inputing texts at cursor position by pressing 'i' key, 'ZZ' to save and exit and ':q!' for exitting without saving" would panic. Learning about commands should be the next step.

I don't think "legacy" fits here. I know plenty of aging "legacy" editors on MS-DOS that have direct editing mode.
Most of screen editors on PC(MS)-DOS should have been started developing after vi had been in use. Isn't it?

And word "modal" for vscode is different here. It didn't require typing "i" to start inputting text.
 
That's not my point.
My point is that if vi is the default and newbies who does not at all learned about vi attempted to install FreeBSD, or worse, newly assigned to manage already configured but EDITOR=vi computer, anything need editing should call vi, and the person doesn't know "I can start inputing texts at cursor position by pressing 'i' key, 'ZZ' to save and exit and ':q!' for exitting without saving" would panic. Learning about commands should be the next step.

100% agreed. Sure people can learn all manner of obscure and non-intuitive keystrokes to pass the "real programmers from 1980" test, but being hurled into that with no clue for the neophyte to do something important like vipw or freebsd-update merge may as well be an exclusionary gatekeeping mechanism for repelling the unwanted newbie.

Like entering single-user mode, couldn't freebsd-update merge offer something friendly like "Press <enter> to use vi, or 'ee <enter>' for the easy editor"?
 
Most of screen editors on PC(MS)-DOS should have been started developing after vi had been in use. Isn't it?
Absolutely (by ~4 years for 86-DOS). So we can all agree that DOS text editors are "modern"!

And word "modal" for vscode is different here. It didn't require typing "i" to start inputting text.
VSCode doesn't yet have any modal input (minus many naff plugins). But when Microsoft adds it, it will almost certainly be seen as modern.
 
It even has a thread on Stack Overflow on how to exit it!
It’s worse: There’s a dedicated vi (and vim) StackExchange community. There’s also eMcs.StackExchange.​
It's a bad example of UI / UX.
I think it’s a good (not superb) example of UI/UX: On an 80×25 terminal you don’t want to waste any real estate. If an operation was successful, there is no unnecessary noise. And the mode concepts is incredibly powerful.​
[…] Is it even worth spending the time to master vi/vim ? […]
No, except for the absolutely rudimentary basics T-Aoki mentioned, I have never really learned vi. All my knowledge has been acquired incidentally. In the end it depends on your workload. You may benefit from specialized editors for your use case.​
[…] My point is that if vi is the default and newbies […]
Well, we could spawn a dialog like Debian’s select-editor if $EDITOR is null or unset.​
[…] or worse, newly assigned to manage already configured but EDITOR=vi computer, […]
This is a management, an organizational issue if the handover is performed poorly. From an operating system’s point of view we cannot magically determine the operator’s knowledge, whether they intentionally set EDITOR=vi or it’s an accidental remnant from the previous operator.​
 

Misses the point.

… If one can't figure out vi, one shouldn't be using a computer at all. …

Given the fondness for exclusion (effectively reducing the user community), I imagine delight at the absence of BSD from FOSDEM 2024. Any other marginalisations in mind?



In other news, The FreeBSD Foundation will focus on things such as community building, and improving the desktop/user experience to make it easier to start using FreeBSD.
 
Unfortunately, there is this abomination called “nano”, which frequently replaces Vi as the default editor on many Linux systems. I think at least on Ubuntu you need to install an extra package to obtain Vi.
Gentoo did this. You know what I did first thing.
 
While flipping between windows - due to muscle memory - I often give the wrong command to save. On vscode, jucipp and the micro editor (and other apps as well) - you type control-S to save. This has a different effect on vi. vi stops writing characters to the screen. Typing control-Q fixes this but it often takes a me a few confused seconds to realize what I've done.
Ctrl-s is awesome until you're using a mouse left-handed. Ctrl-c is extra awesome in that sometimes it means "copy" and other times it means BOOM. It almost makes the Emacs "chords" seem reasonable. Almost.

On the other side, I sometimes type 'i' or ':x' in the middle of a document that is definitely NOT open in vi. This isn't any editors' faults, it's just what it is.
Yeah, I do that all time. Compiler catches it, thankfully.
 
My wife, who is not a native English speaker, will often ask me to fix an email on her Mac. One time, she got annoyed. "Why are you typing jjj all the time?"

BTW, Debian also has nano as the default editor now. Annoying if one installs it, runs visudo, and the file pops up in nano, rather than vi. Easy enough to fix with update-alternatives, but an irksome surprise.
 
BTW, Debian also has nano as the default editor now. Annoying if one installs it, runs visudo, and the file pops up in nano, rather than vi. Easy enough to fix with update-alternatives, but an irksome surprise.
The worst experience I ever had has been a broken Debian system. The rescue disk came with pico, nano or something like that instead of vi. That happend already years ago when 3.5" disk have been common.
 
It's hard for me to understand public vim-hate unless it comes from a person who also insists on using a "safer" alias for rm to move files into a trash directory. It's part of the system; there are reasons, some good, some historical, for why it is the way it is.
 
… what is the suggested replacement?

I wouldn't favour replacement (removal) from base.

… On 12.x at least, sadly there's no /rescue/ee . ……

I can't remember when I last needed to use rescue, but (yes) it would be good to have ee in rescue. It's not excessively large.

Code:
% ls -hln /bin/ed
-r-xr-xr-x  2 0 0   53K 19 Dec 02:36 /bin/ed
% ls -hln /usr/bin/ee
-r-xr-xr-x  3 0 0   99K 19 Dec 02:37 /usr/bin/ee
% ls -hiln /rescue/ed
1807698 -r-xr-xr-x  144 0 0   17M 19 Dec 02:36 /rescue/ed
% ls -hiln /rescue/vi
ls: /rescue/vi: No such file or directory
% ls -hiln /rescue/echo
1807698 -r-xr-xr-x  144 0 0   17M 19 Dec 02:36 /rescue/echo
%

As rescue doesn't include what I need for rescue: instead, I boot from an installer.
 
I can't remember when I last needed to use rescue, but (yes) it would be good to have ee in rescue. It's not excessively large.

Even smaller as an addition; ldd() shows 2 common libs.

Code:
% ls -hln /bin/ed
-r-xr-xr-x  2 0 0   53K 19 Dec 02:36 /bin/ed
% ls -hln /usr/bin/ee
-r-xr-xr-x  3 0 0   99K 19 Dec 02:37 /usr/bin/ee
% ls -hiln /rescue/ed
1807698 -r-xr-xr-x  144 0 0   17M 19 Dec 02:36 /rescue/ed
% ls -hiln /rescue/vi
ls: /rescue/vi: No such file or directory
%

Is that 14.0? 12.x does have /rescue/vi (and ed) but /rescue/$anything is just 12M.
 
Is that 14.0?

15.0-CURRENT WITHOUT_VI.

src.conf(5)

Code:
% grep -v \# /etc/src.conf | sort | uniq

KERNCONF=GENERIC GENERIC-NODEBUG
NO_INSTALLEXTRAKERNELS=no
WITH_CCACHE_BUILD=yes
WITHOUT_LLVM_TARGET_ALL=yes
WITHOUT_TESTS=yes
WITHOUT_VI=yes
% uname -aKU
FreeBSD mowa219-gjp4-zbook-freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n266992-604de40a024c: Tue Dec 19 01:55:41 GMT 2023     grahamperrin@mowa219-gjp4-zbook-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1500007 1500007
%

Code:
% du -h /rescue
8.1M    /rescue
%

Code:
% ls /rescue
[               ed              iscsid          newfs           sleep
bectl           expr            kenv            newfs_msdos     stty
bsdlabel        fastboot        kill            nextboot        swapon
bunzip2         fasthalt        kldconfig       nos-tun         sync
bzcat           fdisk           kldload         pgrep           sysctl
bzip2           fetch           kldstat         ping            tail
camcontrol      fsck            kldunload       ping6           tar
cat             fsck_4.2bsd     ldconfig        pkill           tcsh
ccdconfig       fsck_ffs        less            poweroff        tee
chflags         fsck_msdosfs    link            ps              test
chgrp           fsck_ufs        ln              pwd             tunefs
chio            fsdb            ls              rcorder         umount
chmod           fsirand         lzcat           rdump           unlink
chown           gbde            lzma            realpath        unlzma
chroot          geom            md5             reboot          unxz
clri            getfacl         mdconfig        red             unzstd
cp              glabel          mdmfs           rescue          whoami
csh             gpart           mkdir           restore         xz
date            groups          mknod           rm              xzcat
dd              gunzip          more            rmdir           zcat
devfs           gzcat           mount           route           zdb
df              gzip            mount_cd9660    routed          zfs
dhclient        halt            mount_msdosfs   rrestore        zpool
dhclient-script head            mount_nfs       rtquery         zstd
disklabel       hostname        mount_nullfs    rtsol           zstdcat
dmesg           id              mount_udf       savecore        zstdmt
dump            ifconfig        mount_unionfs   sed
dumpfs          init            mt              setfacl
dumpon          ipf             mv              sh
echo            iscsictl        nc              shutdown
%
 
Unix was written by extremely IT literate people for their own use. It introduced and promoted exceptional ingenuity.

Terseness is just one of the things makes it so popular with the "initiated" and so obtuse to others.

Demands for Unix to become more "user cuddly" are frequently ignored, because doing so makes it more like Windows and less like Unix. Yes, I'm really sure!

I have, however, been known to argue that there is a long history of making Unix less hostile to "ordinary" users.
 
They also don't put child seats in MAC trucks
I think you meant Mack Trucks...
1703733461923.png

And some child seat models are generic, you can put them in almost any vehicle. ;)
 
Any FreeBSD user should know to do man vi Even a Linux user should know that..........(nah)
Unfortunately, if I recall correctly, maybe on sysinstall, I've required to edit something BEFORE I CAN man vi. Also, at the moment, I didn't know vty switch with Alt-Fn to read man vi. It was too late to set EDITOR environ variable to change default to ee (at the moment, I didn't know that FreeBSD has ee). There was no warnings that anyone trying to install FreeBSD must know basic usages of vi. I learned about vi, vty swtich and existence of ee AFTER installed FreeBSD.
 
Back
Top