Steps to Reproduce:
The only way to use the new native tab on macOS is to open a new vscode window then drag one tab into another window.
@miltonbecker the behavior New window
depends on your OS setting.
@kieferrm what setting specifically?
@miltonbecker ⌘ + ⇧ + n does it for me
@gdad-s-river that opens a new window here. I'm wondering what OS setting I have to change :/
I'm having the same issue. Code version 1.12, OS version 10.12.3
Also, any reason why 'Show Tab Bar' is not available in the Command Palette?
You can change this under "System Preferences" -> "Dock".
@sgnh that works, thanks!
But now there is another problem: I can't open a new window 😆
So it's either window OR tab.
I believe there should be a "File -> New Tab" menu option and a "+" button so we can add more tabs easily.
Anyway, should I close this issue or leave it as a feature request?
This was working as expected in 1.12. All new windows would open in new tabs.. 1.12.1 its broken again. Now when I open 2 projects from command line they are back to opening in seperate windows...
There's no "Show Tab Bar" in 1.12.1 😭
I found the problem.
If set "window.newWindowDimensions" to "fullscreen", the new window will not show as tab bar even if in fullscreen.
But new window will open as tab when current window is in fullscree, "window.newWindowDimensions" is set to "default" and "window.nativeTabs" is set to true.
this is totally not what I was expecting by this... I was expecting that tabs would now use the native tab bar - not windows
I would like to add that calling code
on a folder/file from the command line opens a new window regardless of the window.nativeTabs
setting.
Our intention was never to replace the editor tabs with native tabs. Native tabs are to group windows. It is true that we might provide limited functionality, hence we should collect more issues in this item and then propose changes to Electron 👍
Related issues: https://github.com/electron/electron/issues/9086 and https://github.com/electron/electron/issues/9094
It's very confusing to have both "native tabs" and "editor tabs". I think giving users an option to replace editor tabs by the native one is great. Otherwise, the native tabs is, at least to me, not useful at all.
@yingbo For me native tabs play a different roles than editor tabs: I use native tabs to have multiple projects opened, while editor tabs (actually, I keep open files on the sidebar) for the single project's files. This way I don't need to have multiple VSCode windows open!
In File menu, should have New Tab and New Window (like in Chrome). There will be New File menu which is just adding a tab in editor.
For Window menu, it should have "Merge All Windows". If you're using SourceTree you know what I meant.
And to make it more usable, adding a + icon beside the native tabs will be natural for UX. Refer to Safari browser.
This is my 2 cents. Hope this helps.
For anyone struggling to get View > Show Tab Bar to appear, pasting "window.nativeTabs": true
into settings.json and manually quitting and reopening the app doesn't appear to work. You have to fish for it under "Search Settings" on the left panel via Preferences > Settings, click the edit icon, and set it to true that way. That will have the effect of pasting "window.nativeTabs": true
into settings.json, but it will also trigger code to prompt you to restart the editor, after which if you answer yes, it will actually display the new View > Show Tab Bar option.
The current implementation goes against Cocoa design guidelines for the tabs, thus extremely confusing and one has to wonder what was the point of implementing in the first place. Tabs are meant for document apps to be able to collect multiple windows (each displaying a document). Sounds a lot like “editor tabs”. There should be an option to replace editor tabs completely, if this is what users prefer. I reckon most Mac users would prefer using native tabs rather than “editor tabs”.
Native tabs work just fine for me in 1.13.1 but after restarting VS Code all these tabs open in new separate windows. Since there is no "Merge All Windows" option, the only way to put them back into a single window is drag and drop, which is really inconvenient.
I thought I saw merge all windows to tabs, but now in 1.14.0 it's gone.
I can't get native tabs to work either. Version 1.14.2 (1.14.2)
If I pair these two settings, I can get native tabs to work in 1.15.0.
"window.nativeTabs": true,
"window.openFoldersInNewWindow": "on",
It worked for me for a long time, but after rewrite my config (for cleanup) it broke and it's now impossible to get native tabs back again.
I tried everything mentionned above, and it's broken, even on fresh install. Maybe something to change at the system config level.
Sierra 10.12.6
vscode 1.15.1
The only workaround i found for now is to set this settings to "Always" :
But it's a global settings for the whole system.
Latest VS Code insider releases (https://code.visualstudio.com/insiders) come with some additional features for native tab support:
See https://twitter.com/BenjaminPasero/status/906162846186209281
The new stable release (1.17.0) has completely broken the native tabs support on macOS High Sierra (10.13).
High Sierra is covered in https://github.com/Microsoft/vscode/issues/35361
In my vscode, tabbar is still blank.
MacOS version 10.13.2
vscode version 1.19.1
Try to update to 1.19.2
@qiuyuntao @DavidBabel this issue is caused by an electron issue. You can see the electron issue at https://github.com/electron/electron/issues/10657.
We can only hope that issue gets fixed soon :(
Hi, I am not sure if this issue is fixed or not.
I am using Mac OS High Sierra 10.13.4 & Visual Studio 1.23.1.
I tried setting the nativtab to true, and other setting mentioned above. But it is still not working.
I know it was working before.
Any help or guidance I highly appreciated.
@jatinwaichal the source issue was apparently fixed on electron 2.0.
So now we're waiting for vscode to upgrade its electron from 1.7 to 2.0 😄
You can follow this process here: https://github.com/Microsoft/vscode/issues/45542
thanks, @miltonbecker for the update. I will keep an eye on the other ticket
bpasero found a fix! It's still not official but I can confirm it works! (and in the end this issue might not have anything to do with electron hah)
you can check the comments here: https://github.com/Microsoft/vscode/issues/35361#issuecomment-395365519
and the quick-fix-command as said by johnelm (you have to run it after every vscode update, for now):
sed -i -- 's/com.microsoft.VSCode/com.microsoft2.VSCode/g' /Applications/Visual\ Studio\ Code.app/Contents/Info.plist
With Electron 2.0.x we can have a new "New Tab" entry under the "Window" menu to open a new window as window tab:
There is also a new command to assign a keybinding to: workbench.action.newWindowTab
Verifier:
"window.nativeTabs": true
and restart@bpasero Awesome! The new tab is working like a charm in the latest insiders build.
Just installed vscode insiders on a new Mac
and it's not showing the tabs any more. I didn't see this problem when I updated from 1.25 to 1.26.
So I think electron 2.0.x broke setting the NSUseImprovedLayoutPass
default, see https://github.com/Microsoft/vscode/blob/b6411f27b0e41588fa897d51c34eafb636f6cbae/src/vs/code/electron-main/app.ts#L293
After I set the defaults manually:
defaults write com.microsoft.VSCodeInsiders NSUseImprovedLayoutPass -bool true
The tabs show up!
@spike1292 I cannot reproduce that, it works fine for me using insiders.
Most helpful comment
The new stable release (1.17.0) has completely broken the native tabs support on macOS High Sierra (10.13).