[Geany-devel] Changes to templates

Matthew Brush mbrush at xxxxx
Tue Mar 15 20:18:00 UTC 2011


On 03/15/11 10:13, Росен Стоянов wrote:
> Since there's an open thread for templates, i'll post my suggestion here.
> Is it possible to use a color for keywords in a specific language (const,
> var, public, private, protected, if, else etc.) and another for build in
> functions (like echo, print, substr in PHP and toString, toLowerCase in
> JavaScript etc.)?
> It would look nicer :)

If I understand the question properly, yes it's possible at least in 
some languages, for example in filetypes.c (or anything using CPP 
lexer), there's:

   [keywords]
   primary=<built ins for example>
   secondary=<other things>

Then in the [styling] section, the 'word' key would be the style for 
'primary' keywords, and the 'word2' would be the style for 'secondary' 
keywords. Like this:

   [styling]
   ...
   word=<style for primary keywords>
   ...
   word2=<style for secondary keywords>
   ...

For PHP it might not work since the PHP lexer is mushed into the HTML 
lexer, and there's only 1 set of keywords available for PHP.  At least 
this is my understanding.

Cheers,
Matthew Brush



More information about the Devel mailing list