Menu

#1014 Matlab syntax highlighting: comment character specification in filetypes.matlab ignored

None
pending-invalid
nobody
v1.23.1
5
2013-12-20
2013-12-20
No

Geany 1.23.1, GNU/Linux (CentOS) x86_64, built from source

Matlab syntax highlighting: comment character specifications in filetypes.matlab ignored,

Attempting to implement multiline comments for Matlab (.m) files:

%{
...
...
%}

I copy filetypes.matlab from <install_root>/share/geany/ to ~/.config/geany/filedefs/, and specify

comment_open=%{
comment_close=%}

I then reload configs (or restart Genay). This has no apparent effect; specifically, it does not cause multiline comments to be syntax highlighted as comments. In fact I notice that changing the comment_single character has no effect either; however, the ~/.config/geany/filedefs/filetypes.matlab file is not being ignored completely, since e.g. altering the primary keywords list in that file does have the appropriate effect.

Discussion

  • Colomban Wendling

    The comment_open and friends settings are not meant to have an impact on the syntax highlighting, they decide what marks are used to create comment blocks programatically (e.g. using Ctrl+E).

    The highlighting is managed by Scintilla (the editing component we use), which uses pieces of C++ to style the code, it can't use such user-set syntax details.

    However, if you simply want %{ }% comments to be recognized, you'll be happy to hear that this is already fixed in current development version and then will be part of the next release.

     
    • Lionel Barnett

      Lionel Barnett - 2013-12-23

      Ok, thanks for the info - my misunderstanding.

      Good to hear of the comment fix in dev. version; will check it out.

       
  • Colomban Wendling

    • labels: --> MatLab, highlighting
    • status: open --> pending-invalid
     

Log in to post a comment.