4

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.

2 Answers 2

7

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.

1

If you want to disable it in thr settings.json file:

"workbench.editor.enablePreview": false,

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .