- Instant help with your Developer coding problems

Open files always in a new tab in VS Code

Question:
How to open files always in a new tab in VS Code?
Answer:
File -> Preferences -> Settings -> Workbench -> Editor Management -> Enable Preview

// Or in settings.json

"workbench.editor.enablePreview": false
Description:

In VS Code preview mode is enabled by default. This results that a simple click on a file will open the file in a tab. If you click on another file then it will be opened in the same tab instead of a new one. (This is only true if the first file was not modified.)

To always open the selected file in a new tab in Visual Studio Code you need to disable the preview mode. To do this go to File -> Preferences -> Settings -> Workbench -> Editor Management -> Enable Preview

If you prefer to edit settings.json use the following entry:  "workbench.editor.enablePreview": false

Share "How to open files always in a new tab in VS Code?"