So I've been using Visual Studio Code recently and I really like it. However, every time I open a file, a new window will open rather than a new "tab." I've already tried setting window.openInNewWindow
to false
and that doesn't work.
VS Code provides two powerful commands to navigate in and across files with easy-to-use key bindings. Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it.
If you already have a Terminal session running, quit or restart it. When you are in the directory of the files you want to open in VS Code, type code . (that is the word “code” followed by a space, then a period) and the folder will automatically open in VS code.
Launch VS Code and press the “Ctrl” and “P” keys simultaneously to search for a file to open in the current project. Type in the file name. To open the new file in a temporary tab, click on it once. To open the new file in a separate window that you can choose to close manually, double-click it.
Edit regarding VSCode 1.9.0
The VSCode team has changed the default settings since 1.9.0, it should now be the default behavior. If VS Code is still not reusing the same window, you can enforce this behavior with:
"window.openFilesInNewWindow": off
They have also extended the settings available to configure those behaviors (see release note here).
Original answer
This is currently supported by the latest version of VSCode and solution is detailed in this SO post.
Simply add the following setting to your user setting:
"window.openFilesInNewWindow": false
Tested and approved with VSCode 1.4.0 :)
Updated answer since 1.11:
"window.openFilesInNewWindow": "off"
Accepted values are now "on" "off" "default"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With