Development Environment | ![]() ![]() |
Keyboard and Indenting Preferences for the Editor/Debugger
Use keyboard preferences to specify the key binding conventions MATLAB should follow. Use indenting preferences to specify how the Editor/Debugger indents lines.
Key bindings
Select Windows or Emacs depending on which convention you want the Editor/Debugger to follow for accelerators and shortcuts. The accelerators seen 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.
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.
Indent
Indent size. Specify the indent size for smart indenting.
Emacs-style tab key smart indenting.. This indenting convention is based on the style used by the Emacs editor. When you select the style, no lines are automatically indented. To indent a line(s) according to smart indenting practices, you can position the cursor in that line or select a group of lines and then press the Tab key.
Tab
Tab size. Specify the amount of space inserted when you press the Tab key. When you change the Tab size, it changes the space for some existing lines in that file.
Tab key inserts spaces. Check this item if you want a series of spaces to be inserted when you press the Tab key. If the item is unchecked, a tab acts as one space whose length is determined by Tab size.
![]() | Display Preferences for the Editor/Debugger | Printing Preferences for the Editor/Debugger | ![]() |