Gosling Emacs had a very handy "make the following sequence of commands a macro" feature which I used to do stupid fix ups to text files cross file. Things like "find every line which starts with x.. back up two lines and fix something else y and insert z, then save the file and go onto the next one"

People laughed at me pointing to much better tools (spitbol?, sed?) But sometimes the hammer you have smashes those delicate screws into the watch case just beautifully quickly. If somewhat crudely.

I liked teco. It's in the freebsd ports tree as an uplift to c I believe.

G