[Geany-Users] Any way to make geany recognize modelines for syntax coloring?

Lex Trotman elextr at xxxxx
Tue Jan 12 22:08:53 UTC 2016


On 13 January 2016 at 06:58, Thomas Martitz <kugel at rockbox.org> wrote:
> Am 12.01.2016 um 17:23 schrieb Karma Kolabor:
>>
>> Hi, Thomas,
>>
>> thanks for the quick answer - unfortunately I can not get it to work.
>>
>> I have this on top of the file (this is btw a Vagrantfile, so you can
>> easily reproduce):
>> # -*- mode: ruby -*-
>> # vi: set ft=ruby :
>>
>> then I am using this regex in the extract_filetype_regex setting:
>> -\*- mode: ([^\s]+) *-\*-
>>
>> That should match the first line - but no syntax highlighting is
>> happening.
>> The regex should be ok, see http://regexr.com/3cids
>>
>> what am I missing?
>>
>
> I think we could trivially support case insensitivity, either as part of the
> regex specification or as a separate checkbox (or simply unconditionally).
> Can you please create an issue[1] for that so it doesn't get forgotten?

It will have to be in Geany, changing the regex will not do anything.
Filetype names are stored in a hash table, which is intrinsically case
sensitive so, assuming it does not break anything to do so, all uses
of the hash table need to casefold the filetype names.  Not difficult,
but not "trivial" either.

>
> [1] https://github.com/geany/geany/issues
>
> best regards.
>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list