MATLAB-extension-for-vscode
MATLAB-extension-for-vscode copied to clipboard
`edit()` and opens files in MATLAB editor
Using edit()
or open()
opens files in MATLAB editor instead of VSCode
Example:
edit whos
Thanks for the feedback! This is definitely something we will consider supporting in a future release.
One (almost) workaround for this is to create a custom mfile.m
function in C:\Program Files\MATLAB\MATLAB_VERSION\toolbox\matlab\codetools\+matlab\+codetools\+internal\+edit\
:
function mfile(file, ~)
if exist(file , 'file')
system(['code "', which(file), '"']);
end
end
It opens the .m
files in VSCode when called from MATLAB editor, however in VSCode it throws an error as reported in #126