I still use ed every day. Mostly non-interactive use, i.e., "ed scripts". Have not found any "modern" editors that are as small, fast and robust, especially for editing large files.
Plan9's sam (sam -d for command line use) is a great improvement over ed, by the way.

Homepage: http://sam.cat-v.org/

Paper by Rob Pike: http://doc.cat-v.org/plan_9/4th_edition/papers/sam/

And another paper by Pike on sam's command language (at the core of which are what he calls 'structural regular expressions'): http://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pdf

That requires a graphics layer. It expects the use of a mouse. With few exceptions, I do not require a mouse nor a graphics layer. The only editor that can beat ed for non-interactive editing is sed.
Sam also has a command line only mode, invoked with the '-d' switch ('sam -d filename'). This is just like 'ed', no graphics layer or mouse needed. But the command language is both simpler and more powerful IMO, especially the 'X' command for editing multiple files at once.
Is it possible to run sam without loading a graphics layer? As far as I know one cannot run Plan9 in "VGA text mode". If trying run sam on an OS other than Plan9, does sam require a graphics layer, e.g., X11? Last I checked, it does. If this has changed, I am interested.
Indeed, the Plan9 ecosystem itself (including its Linux port, plan9port) is heavily built around GUI and a mouse.

Sam alone, however, can be compiled for command line only, without X11 support under Linux. This has been done in the 9base package:

https://git.suckless.org/9base/file/sam/Makefile.html

https://tools.suckless.org/9base/

There is also an updated Linux version of Sam alone, without any other P9 tools. I suppose this should also be trivial to build without X11 support:

https://github.com/deadpixi/sam/