[Geany-Users] lack of syntax color in gtkrc & similar files

Colomban Wendling lists.ban at xxxxx
Sat Jun 17 23:42:33 UTC 2017


Hi,

Le 17/06/2017 à 13:56, bendov at gmx.com a écrit :
> Only used Geany about 3 mo - quite a bit.  I modified my own color
> scheme, to learn about it, but don't use it exclusively.
> Regardless of many tried color schemes - even default - there's almost
> no syntax color for some files like resource files -  gtkrc - Gtk2 theme
> resource file; or the ~/.gtkrc-2.0 file.
> But if I open those files in Linux's - xed - simple text editor, it
> shows much more syntax color, some syntax errors and clearly all
> commented lines.
> 
> Don't know the lack of color is because Geany doesn't recognize the
> files, or there's not a geany "filetypes.*" file for this type of file?
> Under Document > Set file type, Geany has gtkrc & .gtkrc-2.0 set as
> config files.  Don't know if that's correct.
> 
> Is there a proper way to show more color in files like gtkrc?
> 
> Experimenting, I can set the files as another type and Geany shows more
> color, but I'm not sure if most of the colors correspond to anything
> meaningful from a programming view.

>From my experience the best fit for gtkrc files is the Ruby highlighter;
you could try that and see if it looks good for you.  The thing is that
gtkrc files have their own syntax Geany doesn't really know about, and
that Geany guesses them as RC files which generally have a more INI-like
syntax.

If the Ruby highlighter work good for you, you could create your own
custom filetype based on it and possibly setting the right keywords
even.  And alter filetypes_extension.conf to auto-detect properly, as
the manual says.
And if all this is working superbly, you could write a page on the Wiki ;)

Home this helps,
Colomban


More information about the Users mailing list