If I open a file in Visual Studio Code, it seems to open it in a kind of temporary state. I can see it's in this state due to the tab title being italic:

enter image description here

In this case, if I open another file, for example by clicking on a different file in the sidebar, it opens it in the current tab instead of a new one. It's only by double-clicking on a file that the tab gets out of this temporary state.

So is there an option I can use to make sure all files are always open in a new tab? I think it used to work like this but I must have accidentally pressed some keyboard shortcuts and it went into this mode.

1 Answer 1


It's controlled by configuration option Workbench > Editor: Enable Preview.

Open settings by either main menu option File > Preferences > Settings or pressing Ctrl+, then search for "Enable Preview" and you will see the option. Uncheck the option to disable opening as a preview.

enter image description here

Also if you open the file by double click instead of click will be opened not-as-preview no matter the option; just pointing it out.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.