On OS X, VSCode can persist without any open windows, and remain perfectly usable through the menu bar / dock icon. (Which is great, since it matches OS X's document-centric UI conventions 100%.)
Because of that, I believe it doesn't make a lot of sense to keep non-project (purple) windows open on OS X without any open editors on them, like on this screenshot:
For project (blue) windows, keeping them open makes total sense, since the project itself can be seen as a “document” from the perspective of the document-centric UI.
With this in mind, I'd like to propose that on OS X, whenever you close the last document on a non-project (purple) window, the window itself closes. This behavior would make VS Code consistent with both TextMate and Sublime Text, especially now that you're going to introduce tabs.
Maybe this could be exposed as an option, on by default on OS X. (That way OS X users that want to retain the current behavior can do so, and users of Linux/Windows that want the window closing behavior can also do so.)
This makes sense to me. @weinand do you agree?
@bpasero I'm not using non-project windows and I've never used "Close Editor", but the proposed behaviour makes total sense to me. I'm not sure that we have to introduce a configurable option for this, though.
From looking at how other editors behave I found mixed behaviours so I think a setting might be needed after all. I worry that changing this without setting might break expectations of other users.
Coming from TextMate the current VSCode behavior of keeping the window open stands out. Would be great to have an option for this. Maybe an additional option to control behavior when a folder window is active, versus just a normal file being opened.
VSCode stands out like a sore thumb compared to other macOS apps with the current behavior. If there is a setting it should default to on.
I'd love to see an option for that as well.
Added as "window.closeWhenEmpty" setting (macOS: default enabled, Windows/Linux: disabled by default).
-- Sorry for the English, I used Google Translator --
@bpasero Sorry for the question, does this function on this screen work as if it would disable the status bar?
If so, I think you can set this as default for all operating systems.
@Tekbr how is the status bar related to this feature, not sure I get it?
@bpasero Maybe a misunderstanding about it 🤔 😊 .
For project (blue) windows, keeping them open makes total sense, since the project itself can be seen as a “document” from the perspective of the document-centric UI.
With this in mind, I'd like to propose that on OS X, whenever you close the last document on a non-project (purple) window, the window itself closes.
I will hope to be available at Insiders to really see what it is.
I figured something of the type when there is no open folder or file:
@Tekbr it will take a couple of days before this hits insiders release. It behaves like this:
If the setting is enabled or on macOS by default (unless disabled) the window will close when the last file closes unless a folder is opened in the workspace.
From the settings description:
Controls if closing the last editor should also close the window. This setting only applies for windows that have no folder opened.
@bpasero Much more enlightening now, for me !! Thank you.
Thank you!
I had second thoughts on making closeWhenEmpty enabled by default on macOS and changed it to not be enabled by default simply because we have run so long without this behaviour and I fear this will cause more confusion to our users. Of course you are free to change this setting and have the behaviour you like.
Most helpful comment
Added as
"window.closeWhenEmpty"setting (macOS: default enabled, Windows/Linux: disabled by default).