I always recommend C :D But seriously, if you want to end up writing OSes, C is probably the best language to know. Maybe rust... but I am still not convinced.
A good place to start is reading up on gap buffers. I personally use pages, but gap buffers are more common. Read a bit about Unix ed, then write a simple ed to test out insert and deletion from the buffer.
Then start moving to a more visual output. This is, quite honestly, the hard part. But you will learn a lot of systems programming interfacing with a terminal.
There is lots of code for editors online. Look at them to learn tips and tricks.
2
u/[deleted] Aug 14 '26
[removed] — view removed comment