So I just got a new M1 MacBook Pro 13". I have noticed that when using Sublime Text 4, closing the window erases the state of the editor. On my previous Windows laptop, I could close ST and when I reopen it my tabs are all still there. On this MacBook, clicking the red X and then reopening removes all my tabs and just opens a blank window. Anything I can do to restore the behavior I had on my other computer?
Sublime Text doesn't remember state
Check if the "hot_exit"
setting is set to "always"
in Preferences: Settings
. If it isn’t, consider changing it to "always"
, and that should work.
In all likelyhood, you’re running afoul of MacOS standard policy.
On Windows, when you close the last window for an application, it exits.
On MacOS, when you close the last window for an application, the window is closed; the application remains running.
So, you think you’re closing the app and then restarting it, but what you’re actually doing is closing the window, then clicking the dock icon makes Sublime create a new window, because it was still running.
So is there a way to make it so that when I close the last window and then open one, I get back what I had on that last window?
One way would be to quit the application instead of closing the window, which is available from the menu and is probably mapped to command+q
.
The other way is to use workspaces in your windows so that when you close them you can recall their contents (although that would be a manual step).