top | item 37133070

(no title)

getoffmyyawn | 2 years ago

I think I learned the most about using vi when I worked with an old timer who still used ed. I thought she was crazy at first but watching her edit source code was like watching a wizard cast spells.

Learning to edit primarily via ex mode in vi and vim (commands that start with a ':') is the true vi super power in my opinion.

edit: typos

discuss

order

bluGill|2 years ago

I had to learn ed years ago to configure a device that only had a serial port (it didn't run unix or termcap, but they ported ed for configuration purposes). Every once in a while my machine gets bogged down enough that I can pull up ed and make changes faster than vi (vim?) can load.

SoftTalker|2 years ago

I had to use ed once in a very minimal rescue environment. I had never used it before, and I also only know vi in a very basic way (emacs is my daily driver).

It took some study of man pages and trial and error to achieve what I needed, but I was able to get it done.

kps|2 years ago

I used ed for a few months long ago, working with a mainframe Unix-emulation environment that didn't have character I/O working yet, only line-by-line from the host OS. It taught me how to use regular expressions effectively, since they were the only way to make changes within a line. I think I still do a greater fraction of editing with RE operations than most people.

I know there are Linux distributions now that don't even include ed by default, even though it's in POSIX and occasionally used in scripts.

lloeki|2 years ago

learned vi when I had to develop on a IBM RS6000 with AIX 3 (or 4, but we had to support AIX 3 as well) around 2008.

best shell available was ksh, and the only really usable mode was vi mode.

in addition the only worthwhile editor available on this system and customers was vi. (IIRC emacs was obtainable but not installable on customers machines, and heck of a lot slower than vi)

kps|2 years ago

As Mitch Hedberg once said,

    :2s/wa/i/g