Desktop Tools and Development Environment Previous page   Next Page

Keyboard and Indenting Preferences for the Editor/Debugger

Select File -> Preferences -> Editor/Debugger -> Keyboard and Indenting to specify these preferences:

Key Bindings for the Editor/Debugger

Select Windows, Emacs, or Macintosh depending on which convention you want the Editor/Debugger to follow for accelerators and shortcuts. The accelerators on the menus change after you change this option.

For example, when you select Windows key bindings, the shortcut to paste a selection is Ctrl+V. When you select Emacs key bindings, the shortcut to paste a selection is Ctrl+Y. When you select Macintosh key bindings, the shortcut to paste a selection is Command+V. You can see the accelerator on the Edit menu for the Paste item.

Note that the Editor/Debugger key bindings are also used by some other tools, for example, the Callback field in the Shortcut Editor dialog box.

Tabs and Indents

See also the Language Preferences for the Editor/Debugger for additional indenting preferences.

Tab size.   Specify the amount of space inserted when you press the Tab key. When you change the Tab size, it changes the tab size for existing lines in that file. This does not apply when the preference for Tab key inserts spaces is selected.

Tab key inserts spaces.   Select this item if you want a series of spaces to be inserted when you press the Tab key. If the item is not selected, a tab acts as one space whose length is determined by Tab size.

Indent size.   Specify the indent size for smart indenting. See also Indenting for Enter Key.

Emacs style Tab key smart indenting.   This indenting convention is based on the style used by the Emacs editor and is similar to the Smart indent preference. With this preference selected, lines are indented according to smart indenting practices when you position the cursor in a line or select a group of lines, and then press the Tab key. You then cannot use tabs within a line.

Parentheses Matching Preferences

The Editor/Debugger alerts you to matches and mismatches in pairs of delimiters, that is, in parentheses ( ), brackets [ ], and braces { }, based upon the MATLAB language syntax rules.

Match parentheses while typing.   Select the check box if you want to be alerted to matches and mismatches in pairs of delimiters as you type them. Then choose how you want the Editor/Debugger to alert you to matches using Show match with. When you type a closing (or opening) delimiter, the Editor/Debugger alerts you based on the option you choose:

Also choose how you want MATLAB to alert you to mismatches using Show mismatch with. When you type a closing delimiter that does not have an opening match, MATLAB alerts you based on the option you choose:

Match parentheses on arrow key or mouse movement.   Select the check box if you want to be alerted to matches and mismatches in pairs of delimiters when you move the cursor over a delimiter using forward and back arrow keys, or the mouse. Then choose how you want the Editor/Debugger to alert you to matches using Show match with. When you move the cursor over a closing (or opening) delimiter, the Editor/Debugger alerts you based on the option you choose:

Also choose how you want the Editor/Debugger to alert you to mismatches using Show mismatch with. When you move the cursor over a delimiter that does not have a match, the Editor/Debugger alerts you based on the option you choose:

See Also


Previous page  Display Preferences for the Editor/Debugger Language Preferences for the Editor/Debugger Next page

© 1994-2005 The MathWorks, Inc.