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?

1
  • have you tried to create a new window first: File > New Window Commented Jun 30, 2022 at 0:43

1 Answer 1

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 + ,

Sign up to request clarification or add additional context in comments.

2 Comments

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.
@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.