's' from Webb Miller's _A Software Tools Sampler_ is an exhaustively documented sort-of-stripped-down vi.  Admittedly it's a little tricky to get your hands on the source document (I got it from interlibrary loan back at the end of the Before Times, and archive.org lets you check it out for a limited time, but there may be a waitlist).

It's interesting in that it's not just studying the source to see how it works, but an actual (large) chapter of a book where he steps through the construction of the individual functions and their keybindings.


On Fri, Apr 2, 2021 at 3:42 PM Dave Horsfall <dave@horsfall.org> wrote:
On Thu, 1 Apr 2021, John Cowan wrote:

[ Me thinking of using BDB for editor data structures ]

> I'd use SQLite nowadays, because it takes extraordinary care to make
> sure that no data is lost short of disk failure.  It is considerably
> more robust than the underlying filesystem, and runs embedded in its
> process.  It also means you can readily carry about arbitrary data in
> additional columns; for example, you could make line marks persistent,
> including dot.

Good point; thanks.  I'd forgotten about SQLite...  I doubt if I'll be
writing a new editor any time soon though (VI works just fine) but was
planning on incorporating it in a project I'm working on.

-- Dave