Macintosh Editor

The Macintosh integrated m-file editor has many features which make m-file development more productive.


Toolbar

The toolbar is optional, and may be turned off in the editor's preferences. The toolbar's buttons provide the following capabilities:

Open a new file in the editor.
Open an existing file in the editor.
Save the current m-file to disk.
Print the current m-file.
Cut the selected text to the clipboard.
Copy the selected text to the clipboard.
Paste text from the clipboard into the window.
Undo the last operation. Operations that may be undone include typing, dragging, and dropping.
Find text in the current window.
Go to a specific line number.
Open this file in the m-file debugger.
Pop up a list of subfunctions in this m-file.

Line numbers

Line numbers are optionally displayed along the left edge of the window. They may be turned off in the editor's preferences.

Syntax coloring

As MATLAB commands are typed in the editor window, they are optionally colored according to MATLAB syntax. The defaults color MATLAB keywords (if, for, end, etc.) in blue, strings in green, and comments in red. These colors are selectable in the syntax coloring preferences.

Drag and drop

Text may be dragged and dropped within editor windows, from editor windows to other windows or applications, and from other windows or applications to editor windows. In addition, you may drag a file or folder into an editor window; when you drop it, the path to that item will be dropped.

Auto indent and Smart indent

When the auto indent option is on in the editor's preferences and you press the return key after typing a line, the following line is automatically indented to the same level. If the smart indent option is also on, then the editor will attempt to determine the appropriate indent level for the new line. For example, typing if a == 3 and pressing return will indent the next line at one level beyond the if statement. Smart indenting applies to if, for, while, switch, and other code block statements.

Path popup

Command-clicking in the title of an editor windows displays a popup menu containing the full path to the m-file, as shown in the figure below. Selecting a folder from the popup menu will open that folder in the Finder.

Miscellaneous

Several other features in the editor make m-file development more productive:


Return to Help Desk.