views:

40

answers:

2

In Microsoft Visual Studio 6.0, you could create several files at once by spacing them with double quotes in the "Add files to project" dialog:

"Class1.h" "Class1.cpp" "Class2.h" "Class2.cpp"

It seems they have removed that functionality since 2003. Now, for every file I want to create, I have to select the file type I want, then name it, then press OK, then reopen the dialog for the next file. This is breaking my flow when I'm thinking about all those classes I have to create.

Surely, there is a better, macro free, way. What is it?

+2  A: 

You could make use of the Command windows keywords, such as "new" or "nf"

Have a look at this link Visual Studio Commands and Switches and here are all the available aliases Predefined Visual Studio Command Aliases

Stan R.
I can't believe I didn't know about the command window. However, it seems nf this will just create a window to edit the file, it won't add the file to the project. And I can't find any command to add the file to the project despite MSDN stating the contrary.
Coincoin
it should be File.AddNewItem, but for some reason I can not get it to work in my solution. You could use "nf" then save the files and have the "Show All Files" turned on and quickly add them to the Solution. Sorry I can't help you any further, if I figure something out, I'll keep you updated :)
Stan R.
also, I find the Command window very useful in large solutions, the "open" or "of" command is really good, because it provides intellisense and you can quickly open any file (its especially useful if the file names are also class names)
Stan R.
Yeah, I tried that File.AddNewItem it seems to be missing. Project.AddnewItem just pop the dialog and won't accept any parameters. Shame. But it works nice with the Show All Files options. I always forget to use that feature.
Coincoin
A: 
for(int i = 0; i < 3; i++)
{

Ctrl + Shift + A
Enter

}
heavyd
Is this a joke ?
Ganesh R.