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

Lex Trotman elextr at xxxxx
Tue Jan 12 19:21:20 UTC 2016


On 13 January 2016 at 02:23, Karma Kolabor <collaborista at gmail.com> wrote:
> 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 -*-

The name extracted has to be spelled correctly, Ruby not 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?
>
> Thanks again for your attention,
> Karma
>
> On Tue, Jan 12, 2016 at 3:34 PM, Thomas Martitz <kugel at rockbox.org> wrote:
>> Am 12.01.2016 um 15:29 schrieb Thomas Martitz:
>>>
>>> Am 12.01.2016 um 14:40 schrieb Karma Kolabor:
>>>>
>>>> Hi,
>>>>
>>>> I have not seen any way to make geany recognize modeline line e.g.
>>>> # vi: set ft=ruby
>>>>
>>>> is there a feature or any plugin for this?
>>>>
>>>> If not, may I post this as feature request to the tracker?
>>>>
>>>> thanks for yor attention,
>>>> karma
>>>
>>>
>>> I have a modeline plugin in the works (will be based on my peasy proxy
>>> plugin) but it's not ready yet. I'll try to cover your use case.
>>>
>>> In the meantime you can set up a regex to extract the filetype in the
>>> various preferences that should at cover some filetypes, see
>>> http://www.geany.org/manual/current/index.html#various-preferences
>>
>>
>> Please be aware that for this to work the modeline has to be in the first or
>> second line of the file.
>>
>> Best regards
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list