Ask HN: Anyone using their own custom text editor?

17 points by vasko ↗ HN
I don't think I've ever been truly happy with a text editor, the closes I got is my current neovim setup that has just way too many plugins but it still just isn't quite what I want. So I thought, how hard could it be to write one? Anyone gone down this road before?

8 comments

[ 143 ms ] story [ 1246 ms ] thread
I wrote my own editor, many years ago. I have been using it every day ever since, for all the coding work I do. It is a terminal program, so maintenance has not been burdensome.

https://www.github.com/marssaxman/ozette/

If I did it over again, I might use a rope instead of a line array as the central data structure, but it works well enough that I've never bothered to change it.

I made one using fltk for rust, but I only use it for my diary. They have an editor sample to get you started. I think its not a bad choice if you like rust. Like a true nerd, I also integrated my own homebrew scripting language.
Many years ago I wrote a "bespoke" blogging CMS just for a friend of mine. (The big innovation I'd wanted to try is JavaScript that would preview your post while you were typing it in...)

What I learned is it's fairly simple to make a text editor - but there's also the occasional fiddly little bug that has to be sorted out. (It could've also had security holes -- it was protected by obscurity...)

I was frustrated with downtime at my blogging site at the time -- but in the end I just switched to "live-editing" my blog posts directly on the server using Pico.

Related: I wrote my own task manager which I've been using and maintaining 20+ years straight.
I feel the same as you on this. There's always something not quite right with one editor or another. I did start down the custom path by finding a very bare bones editor, so that I want starting from scratch. I was able to make changes and get it to good enough, but what I found is that there are lots of simple things that aren't always so simple. Things like auto-indenting for example look simple but can be fiddly, especially if you've mixed tabs and spaces. I might come back to it but for now, the other editors are also good enough.
You can check out the book "The Craft of Text Editing" by Craig A. Finseth
(comment deleted)