Ctrl+Shift+P
ext install Matlab
in the command paletteAlternatively, saving the file with a .m
extension, will allow VS Code to understand that it is a MATLAB file, and automatically select the language correctly.git
Ctrl+Shift
key combinationtab
to navigate trough the snippet's variablesOn the right pane, where you have the settings.json file open, add to the json file.github
"matlab.mlintpath" : "path to your mlint.exe file"
For example, on a PC :json
"matlab.mlintpath": "C:\\Program Files (x86)\\MATLAB\\R2012a\\bin\\win32\\mlint.exe"
And on a Mac :app
"matlab.mlintpath": "/Applications/MATLAB_R2016a.app/bin/maci64/mlint"
Now, when you open a Matlab document (.m), VS Code displays warnings and errors.spa
Remark: If you don't want the lint on save option and you want to remove the error message being displayed when the extension activates, change the matlab.lintOnSave
option in the settings file to False
.code
Visual Studio Code's default file association for .m
files is Objective-C, if you want to setup the default file associationt to be Matlab go to the Users preference (File>Preferences>User Settings) and add the following line:blog
"files.associations": {"*.m": "matlab"}