Started working on a really crappy text editor! ✊
SIHPTI
Let's build a graphical text editor in in a thousand lines of C89.
Mouse selection + insert mode.
I can finally edit the program source with the program itself, it's hard as heck to read but it works 👍
Becoming less crappy by the hour.
Kindda wanna do some syntax highlight or something to help with readability.
@neauoire interesting that you start line numbering at zero; I think it's more common for stack traces to count from one.
@technomancy Oh that's a good point, I haven't really given much thought to the line count thing, I'll start it at one, thanks :)
@neauoire you know when vim and emacs both agree to do something the same way there's probably a reason for it =)
@technomancy to be honest, I always have the linecount hidden in Micro. I usually just navigate to the errors by goto line, I'm glad you pointed this out.

@neauoire yeah, I usually lean on the command too. I love the look of the font you're using btw.

I've written one and a half text editors now; the one that's actually usable is 1.7kloc of Fennel. (with coloring, auto-completion, window splits, repls, etc so pretty different from what you're doing)

@technomancy well, if you ever have any other lessons-learnt to give me while I make this usable for myself, I want it :D
@neauoire unfortunately I think most of my lessons learned are not very applicable in a language that doesn't have data structures and closures, because it's mostly "structure your command interaction in terms of data structures that contain closures" =)
@technomancy ah yeah, that's right, I went down that road building the Ronin editor a few years ago.
@neauoire right I mean at some point you're not so much building a text editor as an interactive command framework that lets you attach lambdas to keystrokes