Are you ever annoyed that VSCode replaces the tab you just opened when you click another file? Thank god there’s a simple fix for that.
When you single-click a file, VSCode opens it in “preview mode”. You can see it because the tab name is in italics. The next file you click replaces it, so the file you wanted to keep is gone.
Prerequisites
- VSCode installed
Steps to disable preview mode in VSCode
- Open Settings using
CTRL + ,on Windows or⌘ + ,on Mac - Search for
workbench.editor.enablePreview - Uncheck
Workbench > Editor: Enable Preview - If you also want files opened with
⌘ + Pto stay open, uncheckWorkbench > Editor: Enable Preview From Quick Open
If you prefer editing the settings.json directly, add this:
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": falseIf you don’t want to turn it off completely, double-click the file instead. That opens it in a normal tab.
Now that every file gets its own tab, it’s a good idea to also set a maximum amount of opened tabs.