I have recently learned C and want to start a project to solidify my knowledge. I've settled on making a very simple text editor, something like vim. The problem I face 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 and the code is confusing me. I also found tutorials for making a text editor in C that functions kind of like vim.
Although I thought about following the tutorials, it feels like cheating. How did the vim developers figure out how to code vim without specific tutorials? Or did they start from simpler text editors? How did they figure that out just from knowledge of languages and their documentation?
What is it exactly that I need in order to start writing this text editor without directly following a tutorial? 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?