How to change default syntax highlighter based on extension


#1

I’ve started using Cloud9 to program in Octave, but whenever I make a new “filename.m” file, it sets the syntax highlighter to be Objective-C.

How do I tell Cloud9 to use “MATLAB” syntax highlighting (which is at least similar to Octave) for “.m” files?


#2

you can edit user settings as described in Default Syntax for a given file extension


#3

So I set my settings to be:

"ace": {
    "@newLineMode": "unix",
    "@tabSize": "4",
    "@useSoftTabs": true,
    "@guessTabSize": true,
    "custom-types": {
        "json()": {
            "m": "MATLAB"
        }
    }
},

and that still didn’t seem to work. Am I supposed to restart the workspace or something like that, or am I just doing something wrong?

Thanks.

EDIT: As I was typing this, I looked back and figured it out; the “MATLAB” needs to be lowercase, so it should read “matlab” (even though MATLAB is uppercase in the menu). Thank you!