octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identification string for Octave script detection in VIM


From: Jordi Gutiérrez Hermoso
Subject: Re: Identification string for Octave script detection in VIM
Date: Tue, 17 Apr 2012 13:37:26 -0400

Hey, Júlio, no top-posting, please.

    http://en.wikipedia.org/wiki/Top_posting#Top-posting

On 17 April 2012 11:59, Júlio Hoffimann <address@hidden>
wrote:
> 2012/4/17 Jordi Gutiérrez Hermoso <address@hidden>
>>
>> 2012/4/15 Júlio Hoffimann <address@hidden>:
>>
>> > I've being contacting VIM developers to add Rik's octave.vim
>> > syntax to the official VIM distribution. The problem we face is
>> > that (as we all know) GNU Octave scripts tries to be as
>> > compatible as possible with MATLAB scripts, making the automatic
>> > filetype detection impossible.
>>
>> I don't understand the problem. Automatic filetype detection?
>> Matlab syntax is supposed to be a subset of Octave syntax, so if
>> you have Octave mode, this mode should also be able to handle
>> Matlab syntax.

> We can say with total certainty that all MATLAB keywords are also
> Octave keywords?

They should be. It could happen that Matlab has implemented some
syntax that Octave doesn't have yet, but we generally treat this as a
bug in Octave. Do you have a list of all the keywords in matlab.vim?
They should probably all be in octave.vim.

> If yes, i can contact VIM devs again asking to replace matlab.vim by
> Rik's octave.vim.

If I know anything about Rik, I would wager that like me, he doesn't
think too highly of Matlab syntax, so perhaps his octave.vim doesn't
account for all of the Matlab-style Octave syntax. If necessary, I
think you should then merge matlab.vim and octave.vim into octave.vim
or perhaps matlab-octave.vim, or whatever else seems appropriate.

Note that Emacs's own octave-mode also needs some of this maintenance,
since it doesn't account for some of Matlab's syntax, but I think the
divergence is very small now.

HTH,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]