Introducing mgksh(1), #OpenBSD ksh(1) with mg(1) embedded into it.
Now you never have to learn ed(1)! Install mgksh into /bin and you'll be able to visually edit your text files in single-user mode with everything you expect from mg! For the most broken of systems.