How to always open new file in current window in VSCode?
Whenever I open a file in Windows by double-clicking on it, Visual Studio Code opens that file in a new window even though VSCode is already running.
Any idea how to make it open the file in a new tab instead?
The easiest way to open a new file in Visual Studio Code is with File -> Open File.
Open Visual Studio Code and select File -> Preferences -> Settings -> User tab -> Window -> New Window -> Open Files in New Window -> from the dropdown menu select off (marked by the mouse cursor in the below screenshot). Also check the Open Files in New Window (the next one down in the list) dropdown menu selection. It should be set to default. These settings will make Visual Studio Code open files in a new tab instead of in a new window.