MATLAB: Is the external editor preference not honored when creating a New file from the File menu

defaulteditorfileMATLABnew

When I select File->New->Function (or Script, Component or Enumeration), the MATLAB Editor opens, even though I have modified my preferences to use a different application as the editor. The same problem does not occur if I open an existing file.

Best Answer

The 'Text editor' setting is not honored when creating new files from the File menu. It only applies when opening an existing MATLAB file from within MATLAB.
To work around this issue, open a new file using the EDIT command. This will use the text editor specified in the Editor/Debugger preferences instead of the default editor. To create a new file named foo.m, use:
edit foo.m
where foo.m is a filename that does not exist on the MATLAB path.
To open a blank editor without creating a new file, use:
edit