Writing text editor from scratch in D & Raylib
matheus
matheus at gmail.com
Sat Apr 4 13:44:35 UTC 2026
On Saturday, 4 April 2026 at 09:37:25 UTC, madwebness wrote:
> Hi everyone. Decided to share my work after almost a year of
> slow grind.
>
> "ick" is a text editor I am writing in D...
Do you use any kind of model like buffer gap or anything like
that or you developed your own ?
I used to write games but when going to text editor it was a nice
challenge, for example loading big files, editing etc.
In my case I use my own algo, where I had an array of pointers to
strings of some kind of buffer gaps. Deleting/Adding lines was
pretty fast, just moving pointers around.
In my case even though I wrote syntax highlighting for it, I
wasn't (Still not) fan of this feature, usually I use text editor
in 2 colors white over black that's fit me more.
Have you tried to load and compare big files against other
editors?
I remember a feature I had in linux where I could load files in
steps and editing big files without wait to finish it, because my
editor had "page files" with buffer between them, so it was a
trick that made it load big files instantly while there was a
multi thread job loading other pages. =]
I pretty sure I used some existing linux feature for this, and
since I only used linux I couldn't care for windows, but I
believe this one existed there too.
Good luck on your project,
Matheus.
More information about the Digitalmars-d
mailing list