1

There are some guides in stackoverflow for opening multiple windows in Visual Studio. But it is inside the Visual Studio they are talking about.

Here is what I want. There is one txt file called A.txt in my desktop, I right click it and the context option shows Open With Code, and I open it. There is another txt file called B.txt in my desktop. While I right clit it and open it with visual studio code, both the two files are in the same window.

Is there any setting that the two files can be opened in two windows?

rioV8
  • 24,506
  • 3
  • 32
  • 49
Robin Sun
  • 1,352
  • 3
  • 20
  • 45

1 Answers1

1

Not sure why you want that but actually there is a setting which behaves like you want when turned to "On":

Window: Open Files In New Window Controls whether files should open in a new window when using a command line or file dialog. Note that there can still be cases where this setting is ignored (e.g. when using the --new-window or --reuse-window command line option).

You can find it via: User -> Window -> New Window

You can quickly open the settings dialog by pressing CTRL + ,

Manuel Manhart
  • 4,819
  • 3
  • 24
  • 28
  • 1
    I alwasy use VS Code as a text viewer. I open file A in first project. And one hour later, I open the file B in the second project. Both are in the same windows. After I view the file B, I usually close file B. But I always forge that file A is still in this windows. So, I wrong close file A. This is the reason. Thanks for your help. – Robin Sun Jun 30 '22 at 06:37
  • @RobinSun I see. No need to justify your use case though ;-) It seems my work methodology is very differently. Great I could be of help, it would be glad if you can accept the answer if it worked like you expected. – Manuel Manhart Jun 30 '22 at 07:04