Could you share what data structure you use to keep the text in? I'm curious how text editors work, since you need fast inserts anywhere, is the text a linked list?
That's a very nice piece of work. I'm very interest to get to know more how text editor/IDE works. How hard would be add something like a GUI designer?
Really cool project! At what point in the development did you start to use lite as your editor to develop it? I'm sure that was a fun milestone to hit.
I can't say exactly when, but I was writing it in itself before I made the initial commit on the public repo, so at least 6 months ago. Every change I made since then (in addition to the plugins I wrote) would have been written in lite itself.
Comments (256) 54 threads
Earlier commentshttps://www.cs.unm.edu/~crowley/papers/sds.pdf
Data structure initialization: https://github.com/rxi/lite/blob/master/data/core/doc/init.l...
How insertion works here, which illuminates how the table is used: https://github.com/rxi/lite/blob/143f8867a13a35f5688ad7c9771...
It's two dynamic arrays, of hashes and values, whose sizes grow as powers of two.
There's a good post on the Visual Studio Code blog about why and when they moved on from an array of lines to a new structure based on a piece table.
https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...
All comments shown.
Couldn't load more comments. Check your connection and try again.