this post was submitted on 07 Aug 2023
17 points (100.0% liked)

Text Editors

457 readers
1 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

Basically just the title said. The situation is basically I use a Domain-Specific Language called G'MIC, and to this day, I haven't found a satisfactory answer to the issue of lack of syntax highlighting. At the moment, I am using KDE Kate as it's pretty good at structuring the code with their find/replace feature, tab indicators, and multi-window support.

you are viewing a single comment's thread
view the rest of the comments
[–] Reptorian 2 points 1 year ago* (last edited 1 year ago) (1 children)

Getting highlighting for regex-based selection to work. That seems confusing. I have 7 criterias which is recommended for the G'MIC language.

Note:

  1. Strings that matches #( |$|(#)+).* gets treated as if it was a comment.
  2. Strings that matches #@cli.* are treated as if they’re a header for CLI codes.
  3. Strings that matches \$(-\d+|\w+|\d+) gets treated as if they’re accessed variables.
  4. Strings that matches \w+: are treated as if they’re commands names.
  5. Any texts under control-flow item list gets highlighted as long as they’re outside any characters between 2 quotation marks and of course, taking into account of / being used as escape character.
  6. #@gui gets bolded.
  7. Anything between 2 quotation marks gets highlighted though escape characters would be considered.