My dream text editor

I’ve been using Vim as my main text editor for a long time. I also tried to use Emacs for around one year (With Evil mode) and I appreciate some of the ways that Emacs deal with text editing and customization. For the most part my workflow remained the same and I liked both editors. Ultimately I found Emacs slow and unresponsive in many cases where Vim was blazing through it, and in pursuit of simplicity I just ended up using Vim full time once again.

I would say I feel comfortable with Vim, but from time to time I run into annoyances and minor frustrations. I’ve tried to solve some of these but never quite manage to get where I wanted to get. Neither Vim 8 or NeoVim (my current Vim implementation of choice) addresses these issues.

My dream editor

For a while I’ve fantasized with creating my own hobby text editor tailored to my preferences and idiosyncrasy and if I were to do that, here are some things I would like to have, in no particular order:

Algorithms and data structures

Here are some algorithms that would be interesting to explore for the implementation of the internal structure:

Piece table conerns

This doesn’t seem like a big deal to me to be honest but here is the opinion of someone who clearly knows what they are doing:

There’s one other important concern with piece tables I didn’t see addressed. It depends on the file contents on disk not changing. If your file system supported locking or the ability to get a read-only snapshot, this would be fine, but in practice most don’t. It’s very common, say, to checkout a different git branch while the file is open in the editor. Thus, the editor must store its own copy to avoid corruption. In the long term, I would like to see this solved by offering read-only access to files, but that’s a deeper change that can be made piecewise. - Raph Linus