Re: [gedit-list] Syntax highlighting and mime types (was: Documentation for syntax highlighting files?)



Il giorno mar, 05/12/2006 alle 13.23 +0100, Colin Brace ha scritto:
> Hi all,
> 
> What exactly are the criteria gedit uses to switch on syntax
> highlighting? I have noticed that when I edit Rexx files, syntax
> highlight is disabled *unless* the first line begins with "/*" (the
> start of a comment), which is the customary way of identifying Rexx
> files under OS/2. Under *nix however it is less than satisfactory, as
> the first line is where the bash shebang needs to go
> (#!/usr/bin/regina).
> 

gedit uses the mime type as reported by gnome-vfs (which in turns uses
xdg-mime). 

xdg-mime uses "sniffing" to decide the mime type, in other words it
checks the first chunk of the file and compares it with a database of
regular expressions.
The issues you report are bugs in this database of regular expressions
and should be fixed there. The whole process is transparent to gedit.

ciao
	Paolo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]