[Geany] Several keyword styles per filetype

Nick Treleaven nick.treleaven at xxxxx
Tue Feb 9 16:29:53 UTC 2010


On Mon, 08 Feb 2010 18:10:52 +0100
Wolfram Kläger <wolfram.klaeger at web.de> wrote:

> Can someone please explain, how to style more than one "primary" list of 
> keywords per filetype?
> 
> e.g. my filetypes.common is
> 
> ...
> [named_styles]
> ...
> #word=0xff0000
> #word2=0x00ff00
> #word3=0x0000ff
> ...

BTW, Named styles are just names to use instead of style values in each
of the filetypes.foo files.

> and filetypes.mytype is
> 
> ...
> [styling]
> ...
> word=0x00ffff
> word2=0xff00ff
> # word3=0xffff00
> ...
> [keywords]
> primary=one two three
> secondary=four five six
> # ???=seven eight nine
> 
> Result is, everything is fine with my "primary" hilites. But I don't get 
> any "secondary".
> 
> What if I want to have five or six differently styled keyword lists per 
> filetype?

It depends on the filetype lexer used for syntax highlighting. Some
support more than one keyword set. Have a look at the system filetype
to see what entries are listed under keywords, those are the only ones
you can override.

More generally, I would like Geany to by default separate type, constant
and other keywords with different styles for each filetype that
supports this. E.g. int red, __FUNC__ green and 'for' blue.

Regards,
Nick



More information about the Users mailing list