I enjoyed Katolaz's ed tutorial [0], I found it a great way to learn
a useful subset of ed commands. I haven't used a line editor since
the 80s, but the simplicity is compelling for minor edits, or even
glog posts like this one :).
A nice trick for formatting within ed if you have 'par' installed is
this:
e !par P=[ Ew70 < %
That left-justifies (add a 'j' for full justification) the current
file to a width of 70 but also leaves untouched any lines that start
with '[', like our markdown-style link lists.
Another tip that greatly increases the usability of ed is to run it
under rlwrap, which gives you GNU readline editing and command
history:
rlwrap ed file.txt
Is all it takes.
[0]: gopher://katolaz.net/0/ed_tutorial.txt
Response:
text/plain