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

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

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
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Thomas Martitz-2
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

Best regards.
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Thomas Martitz-2
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
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

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?

Thanks again for your attention,
Karma

On Tue, Jan 12, 2016 at 3:34 PM, Thomas Martitz <[hidden email]> 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
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Karma Kolabor
Ah, hmm, would you please like to make this case  insensitive?
You know, it would be really nice if it just worked out of the box...
modelines are such a common thing...
I do not know how to change case with a regex, maybe there is some way
to do that?
Any other solution to make geany support this are very welcome, thanks!
Have a nice day,
Karma

On Tue, Jan 12, 2016 at 8:21 PM, Lex Trotman <[hidden email]> wrote:

> On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Karma Kolabor
Ah, wait - is there any way to change that expected "Ruby" string to
"ruby" in any configuration file?
Thanks again!
Karma

On Tue, Jan 12, 2016 at 8:32 PM, Karma Kolabor <[hidden email]> wrote:

> Ah, hmm, would you please like to make this case  insensitive?
> You know, it would be really nice if it just worked out of the box...
> modelines are such a common thing...
> I do not know how to change case with a regex, maybe there is some way
> to do that?
> Any other solution to make geany support this are very welcome, thanks!
> Have a nice day,
> Karma
>
> On Tue, Jan 12, 2016 at 8:21 PM, Lex Trotman <[hidden email]> wrote:
>> On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>>>> [hidden email]
>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
On 13 January 2016 at 05:35, Karma Kolabor <[hidden email]> wrote:
> Ah, wait - is there any way to change that expected "Ruby" string to
> "ruby" in any configuration file?

No, as a built-in language its hard coded.  Why can't you just put
both a vi style mode and an emacs style mode for Geany and friends?

> Thanks again!
> Karma
>
> On Tue, Jan 12, 2016 at 8:32 PM, Karma Kolabor <[hidden email]> wrote:
>> Ah, hmm, would you please like to make this case  insensitive?
>> You know, it would be really nice if it just worked out of the box...
>> modelines are such a common thing...
>> I do not know how to change case with a regex, maybe there is some way
>> to do that?
>> Any other solution to make geany support this are very welcome, thanks!
>> Have a nice day,
>> Karma
>>
>> On Tue, Jan 12, 2016 at 8:21 PM, Lex Trotman <[hidden email]> wrote:
>>> On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>>>>> [hidden email]
>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Karma Kolabor
Hey, Lex,
but
# -*- mode: ruby -*-
actually is emacs style, isn,t it? I am no emacs user, tend to use vim
but like to avoid both of them if possible, but in a few files that I
am looking at those modelines are alwys lower-case, maybe this is just
accidentally so, I do not know. Vagrantfiles always come with a
lower-case emacs modeline.

Thanks for your attention,
Karma

On Tue, Jan 12, 2016 at 8:44 PM, Lex Trotman <[hidden email]> wrote:

> On 13 January 2016 at 05:35, Karma Kolabor <[hidden email]> wrote:
>> Ah, wait - is there any way to change that expected "Ruby" string to
>> "ruby" in any configuration file?
>
> No, as a built-in language its hard coded.  Why can't you just put
> both a vi style mode and an emacs style mode for Geany and friends?
>
>> Thanks again!
>> Karma
>>
>> On Tue, Jan 12, 2016 at 8:32 PM, Karma Kolabor <[hidden email]> wrote:
>>> Ah, hmm, would you please like to make this case  insensitive?
>>> You know, it would be really nice if it just worked out of the box...
>>> modelines are such a common thing...
>>> I do not know how to change case with a regex, maybe there is some way
>>> to do that?
>>> Any other solution to make geany support this are very welcome, thanks!
>>> Have a nice day,
>>> Karma
>>>
>>> On Tue, Jan 12, 2016 at 8:21 PM, Lex Trotman <[hidden email]> wrote:
>>>> On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>>>>>> [hidden email]
>>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> [hidden email]
>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
On 13 January 2016 at 06:17, Karma Kolabor <[hidden email]> wrote:
> Hey, Lex,
> but
> # -*- mode: ruby -*-
> actually is emacs style, isn,t it? I am no emacs user, tend to use vim
> but like to avoid both of them if possible, but in a few files that I
> am looking at those modelines are alwys lower-case, maybe this is just
> accidentally so, I do not know. Vagrantfiles always come with a
> lower-case emacs modeline.

IIUC the emacs mode is the name of the mode function minus the -mode,
ie its a part of a lisp name, and lisp is typically case insensitive.
So emacs is probably accidentally case insensitive for the mode name.

>
> Thanks for your attention,
> Karma
>
> On Tue, Jan 12, 2016 at 8:44 PM, Lex Trotman <[hidden email]> wrote:
>> On 13 January 2016 at 05:35, Karma Kolabor <[hidden email]> wrote:
>>> Ah, wait - is there any way to change that expected "Ruby" string to
>>> "ruby" in any configuration file?
>>
>> No, as a built-in language its hard coded.  Why can't you just put
>> both a vi style mode and an emacs style mode for Geany and friends?
>>
>>> Thanks again!
>>> Karma
>>>
>>> On Tue, Jan 12, 2016 at 8:32 PM, Karma Kolabor <[hidden email]> wrote:
>>>> Ah, hmm, would you please like to make this case  insensitive?
>>>> You know, it would be really nice if it just worked out of the box...
>>>> modelines are such a common thing...
>>>> I do not know how to change case with a regex, maybe there is some way
>>>> to do that?
>>>> Any other solution to make geany support this are very welcome, thanks!
>>>> Have a nice day,
>>>> Karma
>>>>
>>>> On Tue, Jan 12, 2016 at 8:21 PM, Lex Trotman <[hidden email]> wrote:
>>>>> On 13 January 2016 at 02:23, Karma Kolabor <[hidden email]> 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 <[hidden email]> 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
>>>>>>> [hidden email]
>>>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> [hidden email]
>>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> [hidden email]
>>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Thomas Martitz-2
In reply to this post by Karma Kolabor
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?

[1] https://github.com/geany/geany/issues

best regards.
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
On 13 January 2016 at 06:58, Thomas Martitz <[hidden email]> 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
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Matthew Brush-2
In reply to this post by Karma Kolabor
On 2016-01-12 11:32 AM, Karma Kolabor wrote:
> Ah, hmm, would you please like to make this case  insensitive?
> You know, it would be really nice if it just worked out of the box...
> modelines are such a common thing...
> I do not know how to change case with a regex, maybe there is some way
> to do that?

According to the docs for the regexp we use it can be done, see here:

https://developer.gnome.org/glib/stable/glib-regex-syntax.html#id-1.5.25.11

I have not tried myself so cannot provide further insight.

Cheers,
Matthew Brush

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Matthew Brush-2
In reply to this post by Karma Kolabor
On 2016-01-12 5:40 AM, Karma Kolabor wrote:
> 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?
>

What about just adding a Ruby file extension or shebang line to allow
Geany to detect it? Sorry if it's not permissible.

Cheers,
Matthew Brush

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
In reply to this post by Matthew Brush-2
On 13 January 2016 at 10:12, Matthew Brush <[hidden email]> wrote:

> On 2016-01-12 11:32 AM, Karma Kolabor wrote:
>>
>> Ah, hmm, would you please like to make this case  insensitive?
>> You know, it would be really nice if it just worked out of the box...
>> modelines are such a common thing...
>> I do not know how to change case with a regex, maybe there is some way
>> to do that?
>
>
> According to the docs for the regexp we use it can be done, see here:
>
> https://developer.gnome.org/glib/stable/glib-regex-syntax.html#id-1.5.25.11
>
> I have not tried myself so cannot provide further insight.

The regex has nothing to do with it, it only *extracts* the filetype
from the pattern, it does not compare it to the list of filetype
names, so case insensitivity in the regex is irrelevant.

>
> Cheers,
> Matthew Brush
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
In reply to this post by Matthew Brush-2
On 13 January 2016 at 10:26, Matthew Brush <[hidden email]> wrote:

> On 2016-01-12 5:40 AM, Karma Kolabor wrote:
>>
>> 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?
>>
>
> What about just adding a Ruby file extension or shebang line to allow Geany
> to detect it? Sorry if it's not permissible.


A vagrant file is not a ruby program file, its a configuration file
for vagrant that happens to be in ruby syntax.  The name of the config
file is "Vagrantfile" so its not possible to add .rb, and since its
not a program it won't run so it should not have a shebang.

>
>
> Cheers,
> Matthew Brush
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Karma Kolabor
I have not seen the relevant geany code, but wouldn't it be a better
approach to fix the hardcoding of the filetype names and make this
configurable?
Ok, certainly not a quick fix anymore... :)
However, a nice case of case-sensitivity in the code that better
should not be there.
I wish I could dig deeper, for now I just use the menu until geany one
day will support mode-line syntax configurations out of the box...
Thanks and have a nice week,
Karma


On Wed, Jan 13, 2016 at 1:42 AM, Lex Trotman <[hidden email]> wrote:

> On 13 January 2016 at 10:26, Matthew Brush <[hidden email]> wrote:
>> On 2016-01-12 5:40 AM, Karma Kolabor wrote:
>>>
>>> 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?
>>>
>>
>> What about just adding a Ruby file extension or shebang line to allow Geany
>> to detect it? Sorry if it's not permissible.
>
>
> A vagrant file is not a ruby program file, its a configuration file
> for vagrant that happens to be in ruby syntax.  The name of the config
> file is "Vagrantfile" so its not possible to add .rb, and since its
> not a program it won't run so it should not have a shebang.
>
>>
>>
>> Cheers,
>> Matthew Brush
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Matthew Brush-2
In reply to this post by Lex Trotman
On 2016-01-12 4:42 PM, Lex Trotman wrote:

> On 13 January 2016 at 10:26, Matthew Brush <[hidden email]> wrote:
>> On 2016-01-12 5:40 AM, Karma Kolabor wrote:
>>>
>>> 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?
>>>
>>
>> What about just adding a Ruby file extension or shebang line to allow Geany
>> to detect it? Sorry if it's not permissible.
>
>
> A vagrant file is not a ruby program file, its a configuration file
> for vagrant that happens to be in ruby syntax.  The name of the config
> file is "Vagrantfile" so its not possible to add .rb, and since its

If it has a fixed name like Gemfile or Rakefile (or Makefile, configure,
SConstruct, etc), can just add that directly to filetype_extensions.conf
like those.

> not a program it won't run so it should not have a shebang.
>

It could still contain a shebang, if the file isn't executable, or
always on Windows, it's just a comment.

Cheers,
Matthew Brush

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lex Trotman
On 13 January 2016 at 14:59, Matthew Brush <[hidden email]> wrote:

> On 2016-01-12 4:42 PM, Lex Trotman wrote:
>>
>> On 13 January 2016 at 10:26, Matthew Brush <[hidden email]> wrote:
>>>
>>> On 2016-01-12 5:40 AM, Karma Kolabor wrote:
>>>>
>>>>
>>>> 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?
>>>>
>>>
>>> What about just adding a Ruby file extension or shebang line to allow
>>> Geany
>>> to detect it? Sorry if it's not permissible.
>>
>>
>>
>> A vagrant file is not a ruby program file, its a configuration file
>> for vagrant that happens to be in ruby syntax.  The name of the config
>> file is "Vagrantfile" so its not possible to add .rb, and since its
>
>
> If it has a fixed name like Gemfile or Rakefile (or Makefile, configure,
> SConstruct, etc), can just add that directly to filetype_extensions.conf
> like those.

Thats a good idea, the OP should try that.

>
>> not a program it won't run so it should not have a shebang.
>>
>
> It could still contain a shebang, if the file isn't executable, or always on
> Windows, it's just a comment.
>
> Cheers,
> Matthew Brush
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Deon Cloete
In reply to this post by Matthew Brush-2
I am unable to unsubscribe from this list and cannot find any guidance as to how to. Could someone please explain how do I unsubscribe?

-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Matthew Brush
Sent: 13 January 2016 02:12 AM
To: [hidden email]
Subject: Re: [Geany-Users] Any way to make geany recognize modelines for syntax coloring?

On 2016-01-12 11:32 AM, Karma Kolabor wrote:
> Ah, hmm, would you please like to make this case insensitive?
> You know, it would be really nice if it just worked out of the box...
> modelines are such a common thing...
> I do not know how to change case with a regex, maybe there is some way
> to do that?

According to the docs for the regexp we use it can be done, see here:

https://developer.gnome.org/glib/stable/glib-regex-syntax.html#id-1.5.25.11

I have not tried myself so cannot provide further insight.

Cheers,
Matthew Brush

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users


“To give us feedback on our service levels, please email your comments to [hidden email]"

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and automatically archived by Mimecast SA (Pty) Ltd, an innovator in Software as a Service (SaaS) for business. Mimecast Unified Email Management (UEM) offers email continuity, security, archiving and compliance with all current legislation. To find out more, contact Mimecast.


_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
12
Loading...