However, I believe that feature request is focusing on the keyboard shortcut whereas the real issue seems to be that unlike other macOS apps (Chrome, Sublime Text, Finder) closing the last tab does not close the window. Visual Studio Code takes a similar approach where closing the last tab doesn’t close the window immediately, but pressing CMD-W after the last tab is closed will indeed close the window.
I don’t care what happens on a mac, but I NEVER want to see this implemented on Obsidian in Windows or Linux.
It is a perfectly normal thing to close the current set of tabs you’re working on in order to start afresh on a new project or area of interest (which means opening other tabs immediately after all the existing ones have been closed).
It would be extremely annoying to have the entire application window close just because you clicked (or pressed a hotkey) one time too many. The user would end up having to always remember to close all tabs except one, then open the new set of desired tabs, before going back to the last unwanted tab to close it.
It also doesn’t make any sense from a UI perspective. A tab close button is to close a tab. The window has its own close button for closing the entire window. That’s literally what it’s there for.
I think alternatively if we could follow the same pattern as Visual Studio Code or Arc Browser where closing the last tab actually closes the last tab and leaves an empty shell of a window.
Then on pressing CMD W a second time, it actually closes the window.
It’s funny with all the threads talking about slow startup times that there are people looking for ways to more easily close the app. I went so far as to remove my close button via CSS so I never accidentally exit
@AlJohri you could easily achieve what you want with CustomJS or any of the JavaScript plugins. Set Cmd+W to point to a script and have that script send a close tab command, unless there are no open tabs, in which case send the close app command.
This behaviour depends totally on the app. And I agree with Quisquose, it’s a totally sensible thing to close all tabs through the process of working, and then open more. To close the app, you can use Cmd-Q like every other app, or to close the vault, consider remapping “Close Window” to a hotkey in MacOS:
I thought this FR existed, but it was just a help thread. Here is some previous discussion.
In macOS there is a difference between closing the window vs closing the application. I would like to close all of the windows but leave the application open and in focus.
That completely depends on the app. Some apps remain open without any windows. Some automatically close. Which behaviour are you asking for? If you want to close the entire app, use Cmd-Q, like every other app in MacOS.
I would like the app to remain open without any windows and use CMD W to close all of the open tabs and then the active window.
I’d say is less of a way to “close the app” (this doesn’t actually close the app) and more of a way to make the application’s behavior consistent with what the user is expecting. This is pretty much the standard behavior for macOS, and it’s not intuitive when a single application in your stack behaves differently.
I think the expected would be that the “last tab” was indeed a tab, and if it was closed you’d get no tabs, and close again it would close the windows (exactly like VSCode).