devenv.exe tabbed documents

413 Views Asked by At

I was wondering if there is any way I can open two documents in Microsoft Visual Studio 2010 Editor in a tabbed fashion. I am currently using the following command line option.

devenv.exe "filename1.txt"
devenv.exe "filename2.txt"

But it opens two separate instances of editors. I want the second file to be opened as tabbed in the already opened editor. I used the /mditabs switch but it doesn't seem to do the job.

devenv.exe /mditabs "filename1.txt"
devenv.exe /mditabs "filename2.txt"

P.S. I am using Visual Studio Editor as external editor in WinSCP. Also, I cannot pass both the file names in one command line.

1

There are 1 best solutions below

0
On

Use the /Edit switch to open files in a running instance of VS2010. If no instance is running, a new instance is started and the file is loaded into it. For example:

devenv.exe /Edit "filename1.txt"

Select one file at a time in WinSCP, and use the edit command on that file; if you select multiple files in WinSCP and use the WinSCP Edit command, each file is opened in a separate VS 2010 instance.

FUNFACT: To see the command line usage and switches for VS2010, open a command line window and enter

devenv.exe /?