VSCode showing only one file in the tab bar (can't open multiple files)

Solution 1:

Check User interface / Tabs. You just need to add the following line in the configuration file.

"workbench.editor.showTabs": false

I also think that How do I disable tabs in Visual Studio Code? is asking the exact opposite of what you are asking.

Solution 2:

On a mac, if both of the existing answers didn't work, you can try command + ctrl + w, worked for me.

Solution 3:

try command + ctrl + w in Mac, it works fine

Solution 4:

The accepted answer didn't work for me for some reason. The answer given in Open files always in a new tab did.

In short: In the menu bar, click on File > Preferences > Settings. Then add the following line to the settings file.

"workbench.editor.enablePreview": false

Solution 5:

This feature is toggled with the command “View: Toggle Tab Visibility”. Internally, it is known as workbench.action.toggleTabsVisibility.

On MacOS, the default keybinding is command + control + w, which is dangerously close to the OS’s "Lock Screen" command command + control + q. (Hitting this accidentally while trying to lock my screen is how I got here!)

On Linux, the default keybinding is meta + control + w

On Windows, the keybinding used to be win + control + w, but it looks like they removed it. See these github issues:

  • Windows key in default keybindings on Windows
  • Add toggleTabsVisibility to keybinding actions