#87 Run Visual Studio commands with arguments from the command window

After the past several weeks of Find tips (i knew i would have a few tips, just not nearly a month’s worth!), let’s change things up a bit and talk about the command window.

Press Ctrl+Alt+A to open the command window.  Check the keybinding for View.CommandWindow if your keybindings are different.  Also available from the View – Other Windows – Command Window.  Now you can run various Visual Studio commands without having to go through the menus. 


>File.Open c:\samples\foo.txt  //Open a file without going through the menu. 
>Help vs.commandwindow  //open a help topic directly
>? i  // get the contents of the variable i
>? i = 10  // set the contents of the variable i

View the following help topic for a list of commonly-used commands that include arguments in VS 2005.  Also available in VS 2008 documentation.

Auto-completion is also provided for both the commands and their corresponding arguments.

Command Window Auto-completion for commands

You can also get auto-completion for arguments. 

Command Window Autocomplete for Arguments