Desktop Tools and Development Environment Previous page   Next Page

Preferences for the Editor/Debugger

Set these preferences for the Editor/Debugger:

General Preferences for the Editor/Debugger

Select File -> Preferences -> Editor/Debugger to specify the preferences on the main pane, listed here. Or click the + to see additional Editor/Debugger preferences:

Editor

MATLAB editor.   Selecting MATLAB editor means that MATLAB uses the built-in Editor/Debugger.

Text editor.   To specify a text editor other than the MATLAB Editor/Debugger, such as Emacs or vi, to be used when you open an M-file from within MATLAB, select Text editor. Specify the full pathname for the editor application you want to use.

For example, specify c:/Applications/Emacs.exe in the Text editor field, and then open a file using Open from the File menu in the MATLAB desktop. The file opens in Emacs instead of in the MATLAB Editor/Debugger.

Note that even if you use another editor, Editor/Debugger preferences are still available because some of the Editor/Debugger preferences apply to other MATLAB tools.

Integrated text editor.   This option appears only if you correctly registered EmacsLink with MATLAB. Select this if you want to use EmacsLink, a tool that allows you to use the Emacs editor with MATLAB debugging capabilities. EmacsLink is not supported by The MathWorks. For details on installing, registering, and using EmacsLink, see Installing EmacsLink.

Most Recently Used File List

Use this preference to specify the number of files that appear in the list of most recently used files at the bottom of the File menu. You select a file from the list to open it.

Opening Files in Editor

On restart.   To start MATLAB and automatically open the files that were open when you last shut down MATLAB, select the item On restart open files from previous MATLAB session. If the item is not selected and you close MATLAB when there are files open in the Editor/Debugger, the next time you start MATLAB, the Editor/Debugger is not opened upon startup.

See Also.   From the Debug menu in the MATLAB desktop, you can select the item Open M-files when debugging.

Automatic File Changes

Reload unedited files that have been externally modified.   This option is useful when you edit files in the Editor/Debugger and outside of MATLAB.

With the option selected, the Editor/Debugger automatically reloads another version of the file as described here. When a file is open in the Editor/Debugger and the same file is also open outside of MATLAB, the Editor/Debugger will automatically use the version open outside of MATLAB if you have not edited the file in the Editor/Debugger.

When you clear this preference, MATLAB displays a dialog box notifying you that the current file was changed outside of MATLAB, and asks if you want to use the latest version.

Add line termination at end of line.   With this preference selected, if the last line in the file is not empty, the Editor/Debugger automatically adds a new empty line to the end of the file. Select this preference if you use your files with other products that expect a new line (sometimes referred to as a <CR>) at the end of the file.

See Also


Previous page  Adding Your Own Demos Display Preferences for the Editor/Debugger Next page

© 1994-2005 The MathWorks, Inc.