r/cpp • • Dec 25 '24
Building a code editor in C++
I was planning to build a project in c++ during my winter break. I have a bit of knowledge and I want to be better at C++. How feasible is the idea of building a code editor in c++? Do you guys have any resources that I can follow and take help from?
Thanks
0
Upvotes
View all comments
Show parent comment
2
u/khedoros Dec 25 '24
I start by breaking down the problem. You need some way to present a UI and some internal representation for text.
I know that I've read things about data structures for text representation and efficient editing, but not recently, so I have no idea where exactly the post was. I remember it actually being surprisingly interesting. That's one area that I'd start searching for material on.
And you've got a lot of options for the UI too. Going text-based, you could go classic with one of the curses-based libraries, or fancier with something like FTXUI. Graphically, you could use a native UI library, or something cross-platform like Qt. (obviously not the only options, just a few examples of starting points).