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?
Greetings, Laurent.
On Sat, 14 Aug 2010 11:21:21 +0200 Laurent Hoeltgen hoeltgman@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
Am Montag, den 16.08.2010, 12:59 +0100 schrieb Nick Treleaven:
On Sat, 14 Aug 2010 11:21:21 +0200 Laurent Hoeltgen hoeltgman@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
On Mon, 16 Aug 2010 19:44:23 +0200 Laurent Hoeltgen hoeltgman@gmail.com wrote:
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?
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?
Sounds good to me, and IMO we should favour open-source software over proprietary anyway. If there are no objections I may change this in the 0.19.1 release.
Regards, Nick
On Tue, 17 Aug 2010 14:44:27 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On Mon, 16 Aug 2010 19:44:23 +0200 Laurent Hoeltgen hoeltgman@gmail.com wrote:
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?
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?
Sounds good to me, and IMO we should favour open-source software over proprietary anyway. If there are no objections I may change this in the 0.19.1 release.
Changed in SVN trunk: http://geany.svn.sourceforge.net/viewvc/geany?view=revision&revision=517...
On second thought it might be best not to include it in 0.19.1 in case it breaks anything.
Regards, Nick