[Geany] Octave and comment character.

Laurent Hoeltgen hoeltgman at xxxxx
Mon Aug 16 17:44:23 UTC 2010


Am Montag, den 16.08.2010, 12:59 +0100 schrieb Nick Treleaven:
> On Sat, 14 Aug 2010 11:21:21 +0200
> Laurent Hoeltgen <hoeltgman at gmail.com> wrote:
> 
> > Hi,
> > 
> > I have a question concerning the Octave/Matlab syntax highlighting. The
> > syntax of Octave and Matlab is mostly the same. However, Octave allows
> > the symbol # to mark comments, but it isn't highlighted in Geany. I
> > thought that copying the file 'filetypes.matlab' to
> > ~/.config/geany/filedefs and changing the lines
> > 
> > comment_open=%
> > comment_close=
> > 
> > to
> > 
> > comment_open=#
> > comment_close=
> > 
> > would do the trick.  But for some reason it doesn't. It still uses % as
> > a comment symbol and ignores #.
> > 
> > What am I doing wrong?
> 
> That setting only controls what Geany uses to 'comment out' lines. The
> highlighting comment char is hardcoded, however I've just seen that the
> source file has two lexers - Matlab and Octave. We only use the Matlab
> one.
> 
> We could either add Octave as a separate filetype or just make the
> Matlab filetype use Octave highlighting (the first is safer but a bit
> messy if the two syntaxes are virtually the same). What do you (and
> other users) think?
> 
> Regards,
> Nick

Hi,

I think the important question in this context is how many people are
really using geany for their Matlab code. Matlab has its own gui with
built in editor... Furthermore, geany executes matlab files in Octave
anyway. So why not just marking the filetype inside geany as octave and
using the octave highlighter?

Greetings,
Laurent




More information about the Users mailing list