Keyboard Preferences

Overview of Keyboard Preferences

To set key binding, tab completion, delimiter matching, and function hints preferences for the Command Window and the Editor, select File > Preferences and then select Keyboard in the left pane of the Preferences dialog box.

Image of Preferences dialog box showing Keyboard pane.

Command Window Key Bindings Preferences

Specify the keyboard shortcuts (key bindings) to be used at the command line.

MATLAB standard (Emacs)

Allows you to use the control keys listed in Keyboard Shortcuts in the Command Window, which should be familiar to existing users of MATLAB and Emacs software. For example, Ctrl+A moves the cursor to the beginning of the line.

Windows

Allows you to use standard control keys for Microsoft Windows platforms. For example, Ctrl+A is the shortcut for Edit > Select All, which selects the entire contents of the Command Window.

Macintosh

This option is available only on Apple Macintosh platforms. It allows you to use keys found on Macintosh keyboards, such as the Command key instead of the Ctrl key.

Editor/Debugger Key Bindings Preferences

Specify the keyboard shortcuts (key bindings) to be used by the Editor and for debugging. The Editor/Debugger key bindings are also used by other tools, for example, the Callback field in the Shortcut Editor dialog box.

Select Windows, Emacs, or Macintosh (available only on Macintosh platforms), depending on which convention you want the Editor to follow for accelerators and shortcuts. The accelerators on the menus change after you change this option.

For example, when you select key bindings for Windows platforms, 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 key bindings for Macintosh platforms, the shortcut to paste a selection is Command+V. You can see the accelerator on the Edit menu for the Paste item.

Tab Completion Preferences

Enable in Command Window

Select the check box to use tab completion when typing functions in the Command Window—for more information about the feature, see Completing Statements in the Command Window — Tab Completion. Clear the check box if you do not want to use the tab completion feature. With the tab completion preference cleared, when you press the Tab key, MATLAB moves the cursor to the next tab stop rather than completing a function—see also the preference for Tab size.

Enable in Editor/Debugger

Select the check box to use tab completion when typing functions in the Editor—for more information about the feature, see Completing Statements in the Command Window — Tab Completion. Clear the check box if you do not want to use the tab completion feature. With the tab completion preference cleared, when you press the Tab key, MATLAB moves the cursor to the next tab stop rather than completing a function. For related information, select File > Preferences > Editor/Debugger > Tab, and click Help.

Tab key narrows completions

Select this check box to narrow the list of possible completions shown by typing another character and pressing Tab. For details, see Narrowing Completions Shown.

Function Hints Preferences

Select the check boxes to show function hints in the Command Window and Editor, or clear the check boxes if you do not want to use function hints. Function hints are a brief presentation of syntax options that help remind you of syntax for a function while you are entering a statement. The hints appear in a temporary pop-up window when you enter the opening parenthesis after a function name. For more information, see Viewing Function Syntax While Entering a Statement — Function Hints.

Tabs and Indents Preferences

The links go to the panes where you can view and set preferences for

Delimiter Matching Preferences

To set these preferences, select File > Preferences > Keyboard > Delimiter Matching . These preferences apply to the Command Window and the Editor.

With these preferences selected, MATLAB alerts you to matched and unmatched delimiters based on the MATLAB language syntax rules. For example, when you type a parenthesis or another delimiter, MATLAB highlights the matched parenthesis or delimiter in the pair.

Delimiter pairs are parentheses ( ), brackets [ ], and braces { }. For the Editor, paired language keywords are also matched. Paired language keywords include for, if, while, else, and end statements.

In the following illustration, MATLAB underlines the left parenthesis in the pair when you move over the right parenthesis using an arrow key.

If the matching delimiter is not visible on the screen, a pop-up window appears and shows the line containing the matching delimiter. In the Editor, the line number is included. Click in the pop-up window to go to that line.

Match 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 MATLAB to alert you to matches by selecting an entry from Show match with. When you type a closing (or opening) delimiter in the Command Window or Editor, MATLAB alerts you based on the option you choose:

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 on arrow key

Select the check box if you want to be alerted to matches and mismatches in pairs of delimiters when you use an arrow key to move the cursor over a delimiter. Then choose how you want MATLAB to alert you to matches by selecting an entry from Show match with. When you move the arrow over a closing (or opening) delimiter in the Command Window or Editor, MATLAB alerts you based on the option you choose:

Choose how you want MATLAB to alert you to mismatches by selecting an entry from Show mismatch with. When you move an arrow key over a delimiter that does not have a match, MATLAB alerts you based on the option you choose:

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS