Howto: Fix Automatically Closing File Tabs in VS Code

Howto: Fix Automatically Closing File Tabs in VS Code

Are you experiencing an issue where you open up a file in VS Code into a new tab, and then next open a different file into a new tab, only to see the first files tab now being closed?

If you are expecting your files to always stay open after you open them, then you want to disable the Enable Preview feature found under Preferences ➔ Workbench ➔ Editor Management.

After disabling the preview feature, your open files will stay open instead of previewing.