[Geany] Bug in pyhton syntax highlight definition.

Colomban Wendling lists.ban at xxxxx
Tue Jun 26 14:55:55 UTC 2012


Le 26/06/2012 15:36, owlet bw a écrit :
> PHP definitions are ruled in *filetypes.html*, because inside
> *filetypes.php* is almost nothing but record to see *filetypes.html.*
> 
> OK. I went to *filetypes.html*. There are groups of definitions which
> start from *html_*, *sgml_*, *php_*, *jscript_*, *python_*
> 
> I changed the settings which start from *php_* and indeed my php scripts
> now look different. *
> *
> 
> Then I changed the settings which start from *python_* but nothing
> changed in my python scripts. And then I realized that maybe there is
> another file for python, and indeed the definitions for python are in
> *filetypes.python*. And changes there reflect my highlighting of python
> script. I also must say that there is no record in *filetypes.python* to
> go to *filetypes.html*. So, it is like independent file for settings.
> 
>  
> 
> 1) Why there is a group of settings *python_* in *filetypes.html*, if
> they do nothing?

They do something, they define mapping for python embedded in HTML (just
like PHP).

> 2) Why there are groups of settings for different languages in one file?
> It confuses a lot.

Well... it's related on how Scintilla deals with embedded syntax (PHP in
HTML, javascript in HTML, etc).  Instead of using the styles of another
filetype, it uses specific styles.  This is far from perfection but I'm
afraid we can't do much.


This said, why did you want to edit filetypes.html/python?  If you want
to change the colors, with 1.22 you can now easily write a colorsheme
file, look e.g. at the alt.conf scheme distributed with Geany (most
probably /usr/share/geany/colorschemes/alt.conf on Linux).  This way you
won't have to bother what's in filetypes.* for the colors, and they will
apply to all filtypes.


Hope it helps,
Colomban



More information about the Users mailing list