48

I have VS Code 1.15.1 and when I work at two projects at once, I choose File -> New Window and open the second project. Clicking File -> New Window opens new window with VS Code. On my other computer (not sure about the VS Code version there), when I click File -> New Window, instead of opening new window, it will rather open new tab, so that I end up with two tabs in one window, each tab for one project and the active tab occupies whole screen estate.

Any ideas what should I change in Settings to achieve this "single window, multiple tabs" layout when having multiple projects?

I use macos (not sure if OS may be somehow related to the window management settings)

5 Answers 5

124
  1. Go to Preferences > Settings.
  2. Search for native tabs
  3. Check the checkbox
Native tabs checkbox
  1. Code will prompt for restart to take effect.
Dialog box prompt for restart
  1. After restart, make sure you have multiple projects open. And then merge all windows as shown below:
Merge all windows
  1. Enjoy multiple tabs in single window.

Note: I think this applies to all Mac OS >= Sierra. Tested with Catalina, Big Sur, Ventura, Sonoma recently.

4
38

Just set in your user settings "window.nativeTabs": true and do Window -> Merge All Windows

note: If you have High Sierra installed, that might be an issue.

Here's the link: Better macOS native window tabs support

2
  • 2
    thank you for response Alex.. though I cannot currently verify if it works, because unfortunately I updated to High Sierra -- and as you properly warned me :) the native tabs don't work there.. just a grey horizontal stripe is displayed where the tabs should be.
    – Peter
    Commented Dec 4, 2017 at 15:17
  • In Sonoma I don't have the "Merge All Windows" option :(
    – Nisim Naim
    Commented Feb 13, 2024 at 10:08
14

In Mac OS, there is a system setting outside of VS Code. Set this and then opening files/folders from the command line will also automatically open the file/folder in a new tab instead of a new window.

In MacOS 12.3 (Monterrey) this is under:

  • System Preferences > General > Prefer tabs ____ when opening documents.

Change this setting to always. (The default is in full screen).

You might additionally need to set the setting in VS Code "window.nativeTabs": true as the other commenters have already suggested.

1
0

I'm using vscode 1.81.1, and you just need to go to settings -> window. Check the Native Tabs (Applies to all profiles). It will prompt for a restart, do that and you're good to go

1
-1

Setting For MAC OS (Ventura V13.1):

Click on code > Settings > settings

Find option: native tabs

Enable and restart VS code

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.