EditorS
- 1 Devlogs
- 1 Total hours
A text editor for everyone
A text editor for everyone
The beginning
Finally enough time to post a devlog. I have spent the last half-an-hour setting up the essential data structures that are needed for a text editor. This is the essential phase where I define the level of abstraction that I will be interfacing with when writing the rest of the code. While I am still indecisive about adding another layer for multiple simultaneous buffers. As already told, I will be using a big gap buffer for storing a file. A stack based cursor struct for storing line/char information and a line table for quickly retrieving the pointer to a line without having to iterate over the whole buffer. I also chose C for the tech stack since this project will be about memory management and fast algorithms. I have thought about using Rust but it would end up as using a scary gui framework for wrapping a crate for some data structure that I don’t understand. I also think about either using SDL or ncurses. Both have ups and downs like ncurses offloading a lot of graphics and font-rendering work to the terminal but being slower and SDL giving me access to the unlimited power of the GPU but also being scary. I wanna try to support both Windows AND Linux this time which is why I had to give up my beautiful Makefiles and use CMake. Meson was an option but the build system is not supposed to be the meat of the project. Of course, right now it is just a collection of structs but there is likely more to follow.
I know this is a big unformatted wall of text but I am here for coding, not writing word documents. Also get to reading the Wikipedia article about Gap Buffers. Really fun