Stop Visual Studio Code From Closing the Current File When Clicking a New File to Open It. Opening files in preview mode is enabled by default in Visual Studio Code. Here are instructions to shut that off.