I use AROS Text Editor on a regular basis to edit c source code. I've always wished that someone would add Syntax Highlighting and fix the annoying text indentation errors!
So this is what I did...
In order to integrate syntax highlighting the editor needs to be able to randomly change pen colors to render the tokens and non-tokens.
In Jed.c in the write_text function that draws the text in the rasterport I changed the foreground text pen color. First I changed it to light blue. But that color is available in prefs. So I changed to bright red just to be sure of the results.
Next I need to add a new function called "write_syntax" that will draw the colored and non-colored text based on token class or non-tokens which don't contain any keywords.
Actually, I might need a Syntax Parser too to isolate the tokens and non-tokens in a text string (syntax highlighting). ;-)
Edited by miker1264 on 19-06-2026 19:36,
2 days ago You do not have access to view attachments
I downloaded Deja Vu Fonts and Open Sans Fonts but I don't know how to install then on AROS.
I tested the syntax highlighting using Annotate. It can be used but it's not visually appealing to me. It works.
You do not have access to view attachments
@retrofaza
Thanks for the link. That's what I was looking for.
@cdimauro
Thanks for the links for the syntax definition files. VSCode uses TextMate.Here's another example of TextMate highlighting that I found.
You do not have access to view attachments
In a way I kinda like the simplicity of the syntax highlighting from Scintilla. It's just enough to make the source code easier to navigate.
This is a screenshot of Scintilla on the right and the Rich Text Format exported from Scintilla and pasted in Microsoft Word. That's a nice feature in Scintilla "Copy as RTF" for syntax.
You do not have access to view attachments