Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

Text Editors with Syntax Highlighting

Last updated on 55 minutes ago
M
miker1264Software Dev
Posted 2 days ago
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
M
miker1264Software Dev
Posted 1 day ago
@AMIGASYSTEM

You're the expert when it comes to fonts! Where can I find the Font Manager? I'd like to install new fonts such as Verdana or Sans Serif.

There are many fonts in the Fonts drawer but only some are installed.
Edited by miker1264 on 20-06-2026 12:10, 1 day ago
M
miker1264Software Dev
Posted 15 hours ago
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
cdimaurocdimauroJunior Member
Posted 13 hours ago
I suggest you to use a common format for the syntax highlight capability of the new editor.
The one from TextMate is very quell known.
I use Sublime Text (an editor with its core written in C++, but with Python embedded and control and enhance everything), which uses a YAML version of TextMate format, which is easier and more convenient to edit nowadays:
https://docs.subl...xdefs.html
https://www.subli...yntax.html
R
retrofazaDistro Maintainer
Posted 12 hours ago

miker1264 wrote:

@miker1264 - 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.


This tutorial explains how to install fonts:
https://arosnews.github.io/how-to-change-system-language/
M
miker1264Software Dev
Posted 59 minutes ago
@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
M
miker1264Software Dev
Posted 55 minutes ago
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
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: retrofaza, cdimauro, miker1264