Set Keyboard Preferences

Keyboard preferences enable you to set suggestion and completion options and delimiter matching options in the Command Window, Editor, and Live Editor.

To set Keyboard Preferences, on the Home tab, in the Environment section, click Preferences. Select MATLAB > Keyboard, and then adjust preference options as described in this table.

PreferenceUsage

Suggestions and completions

Select Tab key narrows completions to have MATLAB® continue to reduce the list of possible names for completions as you type each additional character and press the Tab key. This option is not supported in the Live Editor.

For details, see Code Suggestions and Completions.

In the Command Window or Editor sections, select Enable tab completion to have MATLAB suggest and complete names when you type the first few characters of the name and press the Tab key in the Command Window and/or Editor.

In the Command Window or Editor sections, select Enable function hints to have MATLAB display function hints in the Command Window and/or Editor.

When enabled, if you type a function name with an opening parenthesis, and then pause, a tooltip opens showing the basic syntax for the function. For example:

For details, see Function Syntax Hints.

In the Live Editor and App Designer section, select Show automatically to have MATLAB suggest and complete names automatically when you type the first few characters of the name.

Select Show on tab to have MATLAB suggest and complete names only after you press the Tab key.

Delimiter Matching

Specify when and if MATLAB alerts you to matched and mismatched delimiters. Delimiters include parentheses, brackets, braces, and, in the Editor only, paired keywords.

Select Match while typing (or Show matches and mismatches when typing in MATLAB Online™) to have MATLAB alert you to matched and mismatched delimiters as you type.

Select Match on arrow key (or Show matches and mismatches when using arrow keys in MATLAB Online) to have MATLAB alert you to matched and mismatched delimiters when you move the cursor over a delimiter using an arrow key.

For details, see Delimiter Matching.

Select one of these Show match with options to specify how MATLAB indicates matching delimiters:

  • Balance — The corresponding delimiter highlights briefly.

  • Underline — Both delimiters in the pair display underlines briefly.

  • Highlight — Both delimiters in the pair highlight briefly.

In the Live Editor and in MATLAB Online, changing the delimiter matching indicator is not supported. When delimiter matching is enabled, MATLAB indicates matching delimiters using the Underline option.

Select one of these Show mismatch with options to specify how MATLAB indicates mismatched delimiters:

  • Beep — MATLAB beeps.

  • Strikethrough — The delimiter you type appears crossed out briefly.

  • None — There is no alert.

In the Live Editor and in MATLAB Online, changing the delimiter matching indicator is not supported. When delimiter matching is enabled, the MATLAB indicates mismatching delimiters using the Strikethrough option.

In MATLAB Online to change how MATLAB suggests and completes names in the Editor, Live Editor, and App Designer, go to the MATLAB > Editor/Debugger preferences and select from the available options. To change how MATLAB suggests and completes names in the Command Window, go to the MATLAB > Command Window preferences.