Main Content

Create Shortcuts to Frequent Tasks

You can create shortcuts in projects to perform common project tasks, such as opening important files and loading data.

Run Shortcuts

To run a shortcut, in the Project Shortcuts tab, click the shortcut. Clicking a shortcut in the Project Shortcuts tab performs the default action for the file type. For example, MATLAB® runs .m shortcut files and loads .mat shortcut files. If the shortcut file is not on the path, MATLAB changes the current folder to the parent folder of the shortcut file, runs the shortcut, and then changes the current folder back to the original folder.

Alternatively, in the Files view, you can right-click the shortcut file and select Run. If the script is not on the path, then MATLAB asks if you want to change folder or add the folder to the path.

Create Shortcuts

To create a shortcut from an existing project file:

  1. In the Files view, right-click the file and select Create Shortcut. Alternatively, on the Project Shortcuts tab, click New Shortcut and browse to select a file.

    The Create New Shortcut dialog box opens.

  2. Select an icon and enter a name. If using shortcuts to define steps in a workflow, consider prefixing their names with numbers.

  3. To add the shortcut to an existing group, in the Group field, select a group from the drop-down list. For more information about shortcut groups, see Organize Shortcuts.

  4. Click OK.

The shortcut appears with the selected name and icon on the Project Shortcuts tab. In the Files view, the Status column displays an icon indicating that the file is a shortcut.

Note

Shortcuts are included when you commit your modified files to source control, so you can share shortcuts with other project users.

Organize Shortcuts

You can organize shortcuts by categorizing them into groups. For example, you might create one group of shortcuts for loading data, another for opening files, another for generating code, and another for running tests.

To create a shortcut group:

  1. On the Project Shortcuts tab, click Organize Groups.

  2. Click the Create button.

  3. Enter a name for the group and click OK.

    The new shortcut group appears on the Project Shortcuts tab.

To move a shortcut into a group:

  1. On the Project Shortcuts tab, right-click a shortcut and select Edit Shortcut. Alternatively, in the Files view, right-click a file and select Edit Shortcut.

    The Create New Shortcut dialog box opens.

  2. In the Group field, select a group from the drop-down list and click OK.

Shortcuts are organized by group in the Project Shortcuts tab.

Related Topics