Current self-inflicted pain:
No, not using ed(1). Believe it or not, switching from Vim was a surprisingly remarkable improvement, especially over SSH, & especially since I already know sed, vi, & re_format(7) reasonably well.
It's doing actual, honest to goodness, Turing-complete programming in pure m4, the ancient text macro processor your modern Linux likely has by default, to do the sort of text transformations I'd ordinarily write a shellscript to do.
IDK why I do this to myself.
@cr1901 Indeed, m4 is very fun to write, whatever the purpose, but only once the macro definitions are sorted out and debugged.
@arielmt I love writing m4. I hate maintaining it :o...