Page 2 of 2
Re: Build a text editor
Posted: Mon Jul 14, 2025 3:59 pm
by miso
I find this project interesting, I'm following your posts.
Re: Build a text editor
Posted: Sat Jul 19, 2025 12:22 am
by Olli
Thank you miso ! I think I will find a little bit of time tomorrow to add the third simulation.
Re: Build a text editor
Posted: Sun Jul 27, 2025 7:08 pm
by Nituvious
This is so much fun. I did the same thing a several years ago that I use as my primary editor for c/javascript(weird combo I know).
One thing to look into is the Language Server Protocol. It will help you index source code and provide you with autocomplete and many more tools that make today's editors do their fancy things! Also, once you create a client it's pretty simple to add support for several languages EXCEPT TernJS which is really nice but does whatever the hell it wants and don't not even follow any no language server protocols.
Re: Build a text editor
Posted: Tue Jul 29, 2025 10:11 pm
by Olli
@nituvious
I wasn't aware such a system existed. However, I don't think I'll ever create a server adapted for this, not entirely, anyway. The fit I see is between a server and the "Undo/Redo" function.
Also, I once made a word processor for a 16-bit ASM compiler (which I also designed), with the "undo/redo" function. The ASCII code of the keyboard keys was sufficient to generate a bytecode.
I also made a chess game 30 years ago; another bytecode, obviously, and a tree was required.
So it's likely that a blend of these two concepts would do the trick.
If you can think of any mistakes to avoid so as not to have to recode everything if this server concept becomes necessary, I'm interested.
Thank you for this tip, and I admit to be late (I am often tired by the work). Note that the next simulation will be more basic than a a system with integrated server.
The next step will have two views : the main one, and the general one. A tip I imagine day after day without computer to find easily a place in the text. It is really a thing I do not see everywhere, And there is an ergonomic risk : the general view should not take lots of space. But it should be easily visible even...
Re: Build a text editor
Posted: Tue Jul 29, 2025 11:46 pm
by acreis
I worked a lot in a text editor, my greatest struggle was with undo.
But the need of speed killed my project. I give up when I changed my display to 4k.
In 4k my drawing routines are noticeable slower than native windows control richedit. Even in a good gamer laptop.
I needed something better - for instance, smallcaps, justified paragraph alignment - and now richedit has it.
So I'll stick to richedit.