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 elextr@gmail.com wrote:
On 13 January 2016 at 05:35, Karma Kolabor collaborista@gmail.com 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 collaborista@gmail.com 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 elextr@gmail.com wrote:
On 13 January 2016 at 02:23, Karma Kolabor collaborista@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@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@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users