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 16 hours ago
M
miker1264Software Dev
Posted 5 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, 5 days ago
You do not have access to view attachments
M
miker1264Software Dev
Posted 4 days 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, 4 days ago
M
miker1264Software Dev
Posted 4 days 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 4 days 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 4 days 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 3 days 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 3 days 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
M
magoriumSoftware Dev
Posted 1 day ago

miker1264 wrote:

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

I have seen your post regarding this topic and I grasp what you are looking for.

ALB42 created a syntax highlighting editor for AROS but annotate is also capable of doing so. afaik neither of those exist in a 64-bit version (yet).

The problem with syntax highlighting is the fact that AROS (or actually amiga OS) you gonna have issues with the color palette. Take for example your suggested approach, how does that fare well when the user has selected for example a desktop palette of 4 colours ?

In the past I posted a configuration for annotate that supports FPC highlighting but that only works 100% of the time when it opens the editor on it's own screen so that it is able to use its own (private) palette.

As long a window opens on the workbench you have to keep in mind that other applications (read windows) might want to use their own colorscheme. depending on the number of colours in the palette you might run into an overlap.

just 2 cents.
F
FaroxMember
Posted 24 hours ago
@magorium
I see you are a good user of Annotate could you test my port for Abi-v11 ?
In particular i don't understand if highlight text works or not.
download here https://www.arosworld.org/infusions/forum/viewthread.php?thread_id=2002&pid=12565#post_12564

Thanks
M
miker1264Software Dev
Posted 21 hours ago
@magorium

While I can surely use EdiSyn for AROS 32bit, I'm more interested in writing my own syntax highlighting just for fun if it's possible. ;-)

EdiSyn is written in Free Pascal and it's based on SynEdit which is also written in Pascal. I use C code mostly. Annotate, however, is written in C code and it does syntax highlighting well enough to satisfy most needs.

I'd also like to experiment with Import/Export Rich Text Format and Read Binary (Hexadecimal Text).
AMIGASYSTEMAMIGASYSTEMDistro Maintainer
Posted 21 hours ago
In any case, there is a version of VIM available on AROS 64-bit v11 that works very well following the latest updates
M
miker1264Software Dev
Posted 20 hours ago
Thanks. I'll give EdiSyn and VIM a try to see how it goes. If I like them I'll use them in the meantime. :-)
M
miker1264Software Dev
Posted 18 hours ago
Version 1.01 of the Editor for Amiga OS3 had RGB pen colors. The AROS version of the Text Editor is a stripped down version of that.
Edited by miker1264 on 23-06-2026 20:35, 18 hours ago
You do not have access to view attachments
M
miker1264Software Dev
Posted 16 hours ago
I tried Vim Editor & EdiSyn and both have their merits. I like the color scheme for EdiSyn but for some reason Prefs don't work well.

Vim works using the Sorbet Color theme for some quick edits so it may be my current favorite editor.

I noticed in the Vim Editor some blue blocks at the end of some of the lines of code. I assumed they were trailing white spaces but I couldn't remove them using Vim in AROS.

So I opened the same source code file in Scintilla Text Editor. It had an option to remove trailing white space. So it removed the white space in 260 lines of code! I didn't know there were so many!

While I had the file open I wanted to look at what I thought was an indentation error caused by a bug in AROS Text Editor. Sure enough Scintilla showed little grey arrows before each line that had indentation errors. It had an option to fix indentation errors also.

Sometimes it's better to have more than one text editor. Sometimes there are errors in the code we can't see like indentation & white space.
Edited by miker1264 on 24-06-2026 11:49, 3 hours ago
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: magorium, AMIGASYSTEM, retrofaza, cdimauro, miker1264, Farox