Sublime Forum

[MacOS] I want my tabs to be reopened automatically even if application was closed

#1

I’ve just got my first MacBook after years of using Linux.

The behavior on Linux I got used to:
When I click the “close” button in the top corner ST doesn’t ask me to save files and restores all the tabs including those not saved and it doesn’t ask me to save files.

The same behavior is reachable by closing the window by Cmd-W but I close ST by clicking on the red button that imitates Cmd-Q, not Cmd-W. Therefore, There are no chances to get my tabs back on the next launch.

How to make ST behave as on Linux or Cmd-W on clicking a red button?

0 Likes

#2

Sublime behaves the same way on all platforms; if you close a window that has a project associated with it, you can recall that project later and get state back, and when the application exits the state of everything (all windows and their state) is saved and restored back.

The distinction is that on MacOS applications don’t exit when you close the last window; they keep running in the background so that you can create a new window without waiting for the application to restart.

From your problem, it sounds like you’re running afoul of this; closing the window does just that, which does the same thing that it would have done on Linux except that if it’s the last window, then on Linux that would terminate the app and on MacOS it just closes the window.

This is just a fundamental difference to how MacOS operates; short of using a project for everything, if you want this behaviour on MacOS you need to get into the habit of quitting the application when that’s what you meant to do.

2 Likes

#3

As @OdatNurd said, this is more of a macOS design philosophy side-effect than a SublimeText issue. You will encounter this same behavior in many other apps. Preview to only site one.

Something that can get you closer to a Windows-like behavior, where closing the last window of an application actually quits it, can be reached using RedQuits.

Sadly, it still closes the window before quitting, therefore I will not restore it when relaunching the application like it would when quitting with Cmd + Q.

0 Likes