Re: [textadept] Re: Textadept 3.7 beta 2

From: mitchell <>
Date: Wed, 2 Mar 2011 13:09:02 -0500 (Eastern Standard Time)


On Wed, 2 Mar 2011, Zhehao Mao wrote:

> On 03/02/2011 10:14 AM, Robert wrote:
>> On Wed, Mar 2, 2011 at 12:23 AM, Howie <> wrote:
>> (...)
>>> the file extension for Matlab/Octave scripts is .m. I've already
>>> changed this in my own mime_types.conf, but it would be good for less
>>> tech-savvy users (most Matlab users are probably not hard-core
>>> programmers) if
>>> it was included in the default conf.

Then the Objective-C users would complain :) Anyway, the idea with ta is
that you tweak it for your workflow. The default config obviously won't
work for everyone.

>> The not hard-core programming matlab users are most likely happy with
>> Matlab's editor and the close integration it has. ;-)
>> You can also use an octave shebang line (if you use octave).
>> For cases like this (where different lexers/languages have the same
>> file extensions) I once did a check in set_buffer_properties whether a
>> certain keyword was in the file and switched the lexer language
>> accordingly, for example Django templates that have .html-Extensions.
>> Robert
> I do use octave. Actually, I've found that using the #!/usr/bin/octave
> shebang doesn't work. That's because if you have an octave/matlab script
> "program.m", octave expects it to be executed as "program". Also, there
> are not multiple lexers for .m. Octave and Matlab both use the matlab
> lexer. It is not a difficult matter to associate .m extensions with the
> matlab lexer in the default mime_types.conf. It will also save users
> from the minor inconvenience of having to do it themselves.

I believe most editors lump Matlab and Octave into the same lexer since
they are remarkably similar (save the comment syntax as far as I'm aware).
Feel free to contribute a separate Octave lexer if you know of more
significant differences.

Thanks for the feedback.

Received on Wed 02 Mar 2011 - 13:09:02 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:01:25 EST