
Build a Custom Tool #47
Chapter 6, Speed Hacks
|
181
HACK
create a command called openClass1 that calls the File.OpenFile command
and also specifies which file to open. Here is an example of this command:
>alias openClass1 File.OpenFile Class1.cs
>openClass1
This way you can call the openClass1 command at any time to open the
Class1.cs file. You can also remove aliases that you have already created by
simply adding the
/delete switch at the end of the alias command. Here is
an example of how to remove the
openClass1 alias:
>alias openClass1 /delete
View and Edit Command Window Aliases
While you can create and edit aliases directly in the command window, the
VSTweak power toy provides an easy-to-use graphic interface for these com-
mand window aliases. Using this interface, you can add, edit, or delete com-
mand window aliases.
The VSTweak power toy is one of the more useful power toys for Visual Stu-
dio and is the subject of a number of different hacks in this book. The
VSTweak power toy
[Hack #13] can be downloaded from http://workspaces.
gotdotnet.com/vstweak. Figure 6-3 shows an example of this interface.
Using the Alias Manager, you can create, edit, and delete aliases using a nice
graphical interface. The Available Commands button will show all of the
available commands that you can create aliases for. The View File button
shows the aliases.ini file, which stores all of the command window aliases.