so long story short, I’ve recently started and finished Beginning C by Ivor Horton, and started reading Modern C by Jens Gustedt. I feel confident with my understanding of pointers, which is arguably one of the most confusing things for a beginner to the language, and I want to expand on this knowledge by starting a project on my own as I feel like I have a good understanding of the language so far (from a beginner’s perspective, of course).
So I thought about this for a while, and settled on a very simple text editor, something like vim. The problem I face now though is that I genuinely have no clue how a text editor even works, and I don’t know what to google for to learn about it.
Googling about it led to vim’s github repo (which is useless to me because the codebase is huge with a lot of code that’s confusing me, plus I don’t even know where to begin with it), and also a couple tutorials specifically on making a text editor in C that functions kinda like vim.
Although I thought about following the tutorials, it feels like cheating. Like, how did the vim developers actually figure out how to code vim without specific tutorials? Actually, scratch that, because I’m sure there were more simpler text editors before vim, so how did they figure that out just from knowledge of a (or multiple) programming language and its documentation?
What is it exactly that I need in order to start writing this text editor without actually looking for tutorials specifically on writing it? Another example I like to think of is: how did Dennis Ritchie and Ken Thompson code up Unix? I have an idea of how OS’s function, but I have no idea how to put it into code. What is it that I’m missing? How do I transfer this knowledge of the language into actual, practical use?