Development Environment    

Keyboard and Indenting Preferences for the Editor/Debugger

Use keyboard and indenting preferences to specify the key binding conventions MATLAB should follow, how the Editor/Debugger indents lines, and how the Editor/Debugger alerts you to matches and mismatches in parentheses and other delimiters.

M-file indenting for Enter key

Select the style of indenting you want the Editor/Debugger to use when you press the Enter key. Examples follow, illustrating the different styles.

The indenting style only applies to lines you enter after changing the preference; it does not affect the indenting of existing lines. To change the indenting for existing lines, use the Text menu entries for Indenting .

For any indenting style, you can manually insert tabs at the start of a line.

Example of No Indent Without Tabs.   

Example of No Indent with Tabs.   

Example of Block Indent.   

Example of Smart Indent.   

Key bindings

Select Windows or Emacs 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. You can see the accelerator on the Edit menu for the Paste item.

See also Arrow and Control Keys to Navigate in the Editor.


  Display Preferences for the Editor/Debugger Tabs and indents