Instructions on how to make your own text editor based off of a guide located here.
The guide is an good example of building a project from scratch and also about design choices. Each commit will have an explanation of the lines of code added though for a more full explanation it is best to follow the guide itself.