Sublime sees .m
files as Objective C files.
I've been given a bunch of MATLAB/Octave files to work with using Octave, all with .m
extensions.
If I change the extensions to .matlab
, then Sublime will recognize them and format them correctly, but then Octave doesn't see them.
I would like to either:
(1) alter Sublime so that it recognizes .m
as MATLAB/Octave instead of Objective C, or
(2) tell Octave to recognize .matlab
as something it can just run.
I've poked around on the Sublime and Octave sides of this, but to no avail (this is not the answer), and I'm an Octave noob. Thank you.
Simply type the filename without extension . Type run("filename. m") in the command line of Octave . Then press ctrl + c to exit the file in middle of the run .
Octave is mostly compatible with Matlab. Most matlab functions can be made to run with very little change. With careful coding, you can get your code to run without change in Matlab and Octave.
So there is a package called SublimeREPL (https://github.com/wuub/SublimeREPL) that make use of this property and runs MATLAB directly from Sublime Text. You can also use that for this purpose.
Sublime 2 can be configured to associate certain file extensions to certain syntax highlighting schemes. See this answer for exactly how to do it https://stackoverflow.com/a/8014142/694184
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With