| Cool! I used BSD ed (OS X) exclusively for a few months but I stopped because of a few things that were too clunky for me. Wrapping text: I used fmt all the time. But you can't pipe text straight through fmt, so I ended up doing this a lot: 3w |fmt>fmt # create a file called fmd in cwd 3r fmt 3d Which is OK if you have just one line to wrap. If there are newlines in the text you're wrapping, you have to remember the line numbers of the unwrapped text (or use ka, kb) to delete them. Inserting text in the middle of a line. Either use s// (which is annoying if your inserted text has a lot of slashes) or split the line, add an in between line with the new text, and join. s/split text/split text\ # <- backslack escapes newline Then use a or i to insert a line. Then join three lines with j. It gets old after a while. And then there was my false hope that I learned a universal editor that was everywhere. Except GNU ed is not BSD ed is not OpenBSD ed is not Solaris ed. Anyhoo, would be fun to read how someone who stuck with it (unlike myself) uses ed. |
It's interesting you mention inconsistencies across implementations, even more (I assume) going from BSD to GNU ed which unsurprisingly is almost a superset of features with heretical commands such as yank (!).
BSD tends to stick more to POSIX, so issuing just `t` won't duplicate the current line, which I've grown used to. I also like the paging command `z`, which seems to have been adopted by all major implementations. I'm sure Ken would find all of this bloatware!