For all of you that use Kate editor to code G'MIC scripts, what highlighting set up do you use?

Nothing more needs to be said than the title, really.

For more info for those that needs it - I’m basically trying to make scripting as easy as possible by being able to see highlights to understand my script better. As of now, I’m using PASCAL highlighting, but I wish I can see ? : as different highlights.

I think we touched on the topic before but didn’t discuss it. I don’t use code highlighting at all for the simple reason that there isn’t one for G’MIC. If the highlighting isn’t feature complete, it gets kind of confusing.

My main strategy is to keep it simple because I am stupid (KISS). Basically, I indent, space, make new lines and comments. I also divide and conquer with shorter and smaller equations and scripts.

Keeping it simple is what I’m trying to do when achieving certain ideas I’d like to see, but apparently, that’s not possible with the latest cli command I’m working on.

It might be a good exercise to present one of your complex scripts and have other programmers and scripts writers give you advice on how to make it more presentable and simpler yet functionally the same. To me, debugging is one thing but when I see some of the scripts that you or @Joan_Rake1 share, my eyes glaze over and I feel that I cannot help you. :blush::stuck_out_tongue:

Sorry for the digression. I am curious if Kate has any capability of being extended. Some text editors accept additions and tweaks to syntax highlighting.

I believe I found the solution in settings. I might have to play with that. Kate is also open-source, so I might get around to make the highlighting specifically for G’MIC, but unlikely, but if I do, I’ll tell this community all about it just so that it is suitable for everybody.

Yes, would be cool if we could have the full complement of tools: syntax highlighting, completion, templates, tidy and beautify. :rainbow::slight_smile:

1 Like

Kate highlighting definitions are xml files. See this documentation and all the default highlighting files.

If you create a custom xml file for G’MIC (probably it is easiest to base it on one of the existing files), you can put them in your home directory and Kate will find them. To quote the documentation:

Custom .xml highlight definition files are located in org.kde.syntax-highlighting/syntax/ in your user folder found with qtpaths--paths GenericDataLocation which usually is $HOME /.local/share

2 Likes