New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command to open a new window as tab (Sierra tabs) #25919

Closed
miltonbecker opened this Issue May 4, 2017 · 36 comments

Comments

@miltonbecker

miltonbecker commented May 4, 2017

  • VSCode Version: 1.12
  • OS Version: macOS Sierra

Steps to Reproduce:

  1. Enable window.nativeTabs in settings
  2. Click on View -> Show Tab Bar
  3. Try to open a new tab now - there is no File -> New Tab, pressing cmd+shift+t or cmd+t doesn't open a tab either, double clicking the tab also doesn't do anything.

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.

@kieferrm

This comment has been minimized.

Show comment
Hide comment
@kieferrm

kieferrm May 4, 2017

Contributor

@miltonbecker the behavior New window depends on your OS setting.

Contributor

kieferrm commented May 4, 2017

@miltonbecker the behavior New window depends on your OS setting.

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker May 4, 2017

@kieferrm what setting specifically?

miltonbecker commented May 4, 2017

@kieferrm what setting specifically?

@gdad-s-river

This comment has been minimized.

Show comment
Hide comment
@gdad-s-river

gdad-s-river May 4, 2017

@miltonbecker ⌘ + ⇧ + n does it for me

gdad-s-river commented May 4, 2017

@miltonbecker ⌘ + ⇧ + n does it for me

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker May 4, 2017

@gdad-s-river that opens a new window here. I'm wondering what OS setting I have to change :/

miltonbecker commented May 4, 2017

@gdad-s-river that opens a new window here. I'm wondering what OS setting I have to change :/

@Richard-Scap

This comment has been minimized.

Show comment
Hide comment
@Richard-Scap

Richard-Scap May 4, 2017

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?

Richard-Scap commented May 4, 2017

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?

@sgnh

This comment has been minimized.

Show comment
Hide comment
@sgnh

sgnh May 4, 2017

You can change this under "System Preferences" -> "Dock".
dock

sgnh commented May 4, 2017

You can change this under "System Preferences" -> "Dock".
dock

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker May 4, 2017

@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?

miltonbecker commented May 4, 2017

@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?

@jaybeecave

This comment has been minimized.

Show comment
Hide comment
@jaybeecave

jaybeecave May 4, 2017

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...

jaybeecave commented May 4, 2017

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...

@HADB

This comment has been minimized.

Show comment
Hide comment
@HADB

HADB May 5, 2017

There's no "Show Tab Bar" in 1.12.1 😭

HADB commented May 5, 2017

There's no "Show Tab Bar" in 1.12.1 😭

@HADB

This comment has been minimized.

Show comment
Hide comment
@HADB

HADB May 5, 2017

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.

HADB commented May 5, 2017

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.

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton May 5, 2017

this is totally not what I was expecting by this... I was expecting that tabs would now use the native tab bar - not windows

balupton commented May 5, 2017

this is totally not what I was expecting by this... I was expecting that tabs would now use the native tab bar - not windows

@gianmarcotoso

This comment has been minimized.

Show comment
Hide comment
@gianmarcotoso

gianmarcotoso May 5, 2017

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.

gianmarcotoso commented May 5, 2017

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.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero May 5, 2017

Member

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: electron/electron#9086 and electron/electron#9094

Member

bpasero commented May 5, 2017

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: electron/electron#9086 and electron/electron#9094

@bpasero bpasero added the upstream label May 5, 2017

@bpasero bpasero removed their assignment May 5, 2017

@bpasero bpasero added the workbench label May 5, 2017

@bpasero bpasero changed the title from No way to open a new native tab in vscode 1.12 to Improve native tabs (Sierra) functionality May 5, 2017

@yingbo

This comment has been minimized.

Show comment
Hide comment
@yingbo

yingbo May 9, 2017

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 commented May 9, 2017

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.

@gianmarcotoso

This comment has been minimized.

Show comment
Hide comment
@gianmarcotoso

gianmarcotoso May 11, 2017

@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!

gianmarcotoso commented May 11, 2017

@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!

@davistan

This comment has been minimized.

Show comment
Hide comment
@davistan

davistan May 11, 2017

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.

davistan commented May 11, 2017

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.

@kethinov

This comment has been minimized.

Show comment
Hide comment
@kethinov

kethinov May 16, 2017

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.

kethinov commented May 16, 2017

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.

@LeoNatan

This comment has been minimized.

Show comment
Hide comment
@LeoNatan

LeoNatan May 21, 2017

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”.

LeoNatan commented May 21, 2017

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”.

@qbilius

This comment has been minimized.

Show comment
Hide comment
@qbilius

qbilius Jun 20, 2017

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.

qbilius commented Jun 20, 2017

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.

@beeing

This comment has been minimized.

Show comment
Hide comment
@beeing

beeing Jul 13, 2017

I thought I saw merge all windows to tabs, but now in 1.14.0 it's gone.

beeing commented Jul 13, 2017

I thought I saw merge all windows to tabs, but now in 1.14.0 it's gone.

@okonon

This comment has been minimized.

Show comment
Hide comment
@okonon

okonon Aug 4, 2017

I can't get native tabs to work either. Version 1.14.2 (1.14.2)

okonon commented Aug 4, 2017

I can't get native tabs to work either. Version 1.14.2 (1.14.2)

@bishless

This comment has been minimized.

Show comment
Hide comment
@bishless

bishless Aug 10, 2017

If I pair these two settings, I can get native tabs to work in 1.15.0.

"window.nativeTabs": true,
"window.openFoldersInNewWindow": "on",

bishless commented Aug 10, 2017

If I pair these two settings, I can get native tabs to work in 1.15.0.

"window.nativeTabs": true,
"window.openFoldersInNewWindow": "on",
@DavidBabel

This comment has been minimized.

Show comment
Hide comment
@DavidBabel

DavidBabel Aug 29, 2017

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" :
image
But it's a global settings for the whole system.

DavidBabel commented Aug 29, 2017

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" :
image
But it's a global settings for the whole system.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Sep 10, 2017

Member

Latest VS Code insider releases (https://code.visualstudio.com/insiders) come with some additional features for native tab support:

  • there is a "+" in the tab well to create a new tab (= empty window)
  • there are new commands to manage tabs under the window menu (Show Next Tab, Show Previous Tab, Merge All Windows, Move Tab to New Window)
  • all commands are also accessible from command palette and can have keybindings (including the command Toggle Windows Tabs Bar to show or hide the tab bar)

See https://twitter.com/BenjaminPasero/status/906162846186209281

Member

bpasero commented Sep 10, 2017

Latest VS Code insider releases (https://code.visualstudio.com/insiders) come with some additional features for native tab support:

  • there is a "+" in the tab well to create a new tab (= empty window)
  • there are new commands to manage tabs under the window menu (Show Next Tab, Show Previous Tab, Merge All Windows, Move Tab to New Window)
  • all commands are also accessible from command palette and can have keybindings (including the command Toggle Windows Tabs Bar to show or hide the tab bar)

See https://twitter.com/BenjaminPasero/status/906162846186209281

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker Oct 6, 2017

The new stable release (1.17.0) has completely broken the native tabs support on macOS High Sierra (10.13).

  • The tab bar is now blank, completely blank. I can't see any tab, nor text, nor the + sign.
  • When I click on the supposed-to-be tab bar, a new window opens instead.
  • When I click on "Merge All Windows", I can't see any tabs on the tab bar. However, I can see the tabs when I click on "Show All Tabs".

miltonbecker commented Oct 6, 2017

The new stable release (1.17.0) has completely broken the native tabs support on macOS High Sierra (10.13).

  • The tab bar is now blank, completely blank. I can't see any tab, nor text, nor the + sign.
  • When I click on the supposed-to-be tab bar, a new window opens instead.
  • When I click on "Merge All Windows", I can't see any tabs on the tab bar. However, I can see the tabs when I click on "Show All Tabs".
@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Oct 6, 2017

Member

High Sierra is covered in #35361

Member

bpasero commented Oct 6, 2017

High Sierra is covered in #35361

@qiuyuntao

This comment has been minimized.

Show comment
Hide comment
@qiuyuntao

qiuyuntao Jan 9, 2018

In my vscode, tabbar is still blank.
MacOS version 10.13.2
vscode version 1.19.1

image

qiuyuntao commented Jan 9, 2018

In my vscode, tabbar is still blank.
MacOS version 10.13.2
vscode version 1.19.1

image

@DavidBabel

This comment has been minimized.

Show comment
Hide comment
@DavidBabel

DavidBabel Jan 12, 2018

Try to update to 1.19.2

DavidBabel commented Jan 12, 2018

Try to update to 1.19.2

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker Jan 12, 2018

@qiuyuntao @DavidBabel this issue is caused by an electron issue. You can see the electron issue at electron/electron#10657.

We can only hope that issue gets fixed soon :(

miltonbecker commented Jan 12, 2018

@qiuyuntao @DavidBabel this issue is caused by an electron issue. You can see the electron issue at electron/electron#10657.

We can only hope that issue gets fixed soon :(

@jatinwaichal

This comment has been minimized.

Show comment
Hide comment
@jatinwaichal

jatinwaichal May 28, 2018

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 commented May 28, 2018

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.

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker May 29, 2018

@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: #45542

miltonbecker commented May 29, 2018

@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: #45542

@jatinwaichal

This comment has been minimized.

Show comment
Hide comment
@jatinwaichal

jatinwaichal May 29, 2018

thanks, @miltonbecker for the update. I will keep an eye on the other ticket

jatinwaichal commented May 29, 2018

thanks, @miltonbecker for the update. I will keep an eye on the other ticket

@miltonbecker

This comment has been minimized.

Show comment
Hide comment
@miltonbecker

miltonbecker Jun 9, 2018

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: #35361 (comment)

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

miltonbecker commented Jun 9, 2018

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: #35361 (comment)

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

@bpasero bpasero changed the title from Improve native tabs (Sierra) functionality to Add a command to open a new window as tab (Sierra tabs) Jul 8, 2018

@bpasero bpasero self-assigned this Aug 7, 2018

@bpasero bpasero added this to the August 2018 milestone Aug 7, 2018

@bpasero bpasero closed this in 6f3f9ed Aug 7, 2018

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 7, 2018

Member

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:

image

There is also a new command to assign a keybinding to: workbench.action.newWindowTab

Verifier:

  • you need to enable "window.nativeTabs": true and restart
  • you can use the command from the Window menu
  • you can use the command via keybinding or command palette
Member

bpasero commented Aug 7, 2018

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:

image

There is also a new command to assign a keybinding to: workbench.action.newWindowTab

Verifier:

  • you need to enable "window.nativeTabs": true and restart
  • you can use the command from the Window menu
  • you can use the command via keybinding or command palette

bpasero added a commit that referenced this issue Aug 8, 2018

@spike1292

This comment has been minimized.

Show comment
Hide comment
@spike1292

spike1292 Aug 18, 2018

@bpasero Awesome! The new tab is working like a charm in the latest insiders build.

Just installed vscode insiders on a new Mac

screen shot 2018-08-18 at 17 57 30

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

systemPreferences.registerDefaults({ NSUseImprovedLayoutPass: true });

After I set the defaults manually:

defaults write com.microsoft.VSCodeInsiders NSUseImprovedLayoutPass -bool true

The tabs show up!
screen shot 2018-08-18 at 18 08 29

spike1292 commented Aug 18, 2018

@bpasero Awesome! The new tab is working like a charm in the latest insiders build.

Just installed vscode insiders on a new Mac

screen shot 2018-08-18 at 17 57 30

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

systemPreferences.registerDefaults({ NSUseImprovedLayoutPass: true });

After I set the defaults manually:

defaults write com.microsoft.VSCodeInsiders NSUseImprovedLayoutPass -bool true

The tabs show up!
screen shot 2018-08-18 at 18 08 29

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 19, 2018

Member

@spike1292 I cannot reproduce that, it works fine for me using insiders.

Member

bpasero commented Aug 19, 2018

@spike1292 I cannot reproduce that, it works fine for me using insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment