Share via


Creating Custom Aliases for Visual Studio Commands

Visual Studio commands provide a means of interacting with the integrated development environment (IDE) from the keyboard. Dialog boxes, windows, and other items within the IDE have a command equivalent that you can type into the Command window or Find/Command box to display and, in some cases, execute the item. You can create custom names, or aliases, for complete command names to help you remember and enter the commands more easily.

To create an alias for a Visual Studio command

  1. Open the Command window or place the focus in the Find/Command box.

  2. Type >alias, then the name for the alias, followed by the command you want to create an alias for. For example:

    >alias myAlias File.NewProject "Visual Basic Projects\Windows Application"
    
  3. Press ENTER.

The status bar displays the text "Alias <aliasname> created". The new alias now appears in the auto-completion list for commands.

To delete an alias for a Visual Studio command

  1. Open the Command window or place the focus in the Find/Command box.

  2. Type >alias, then the name of the alias, followed by /delete. For example:

    >alias myalias /delete
    
  3. Press ENTER.

The status bar displays the text "Alias <aliasname> deleted". You can view the list of current aliases and their definitions.

To view a list of all current aliases and definitions

  • In the Command window, type >alias and press ENTER.

    A list of the current Visual Studio command aliases appears, including the definitions for the aliases. You can then print the contents of the Command window.

    Tip   To clear the contents of the Command window, type >cls.

You can also view the definition of a single alias.

To view the definition for a single alias

  • In the Command window, type >alias, followed by the alias name.

See Also

Visual Studio Commands | Pre-defined Visual Studio Command Aliases | Command Window | Find/Command Line | Alias Command | Customizing the Development Environment