Indeed Sublime 2 remembers the last window layout in a way that Sublime 3 doesn’t. I believe it also stores the state of find operations as well. I don’t know why the layout save change was made, but storing find state differently was an explicit change in build 3143 (Sublime 3.0):
https://www.sublimetext.com/3:
- New windows start with an empty
find
history
If I recall correctly, that was not a popular decision at the time or through the dev series that led up to the release.
In any case, neither of those is the same as what hot_exit
purports to do:
// Exiting the application with hot_exit enabled will cause it to close
// immediately without prompting. Unsaved modifications and open files will
// be preserved and restored when next starting.
//
// Closing a window with an associated project will also close the window
// without prompting, preserving unsaved changes in the workspace file
// alongside the project.
"hot_exit": true,
Regardless of the platform you’re on, closing a window with unsaved files in it that does not have a project attached causes you to be prompted to save unsaved changes (as in both of your videos) and then closes the window without saving any state, regardless of the setting of hot_exit
.
In reference to hot_exit
and your problem, the implication would be (to me) that the hot_exit
setting should save the state of every window when you close it (i.e. not just project windows) so that when you create a new window, it gets restored (because that’s what hot_exit
does).
In such a case, unless it only ever saved the last window you closed, the list of saved windows would grow ever larger over time and require you select the one you want to re-open from a growing list.
However you probably don’t want to have only X last windows saved, because as soon as you commit to X, someone will come along that uses X + 1 windows every day and will be unhappy that one of their windows is not persisted.
Walls of rambling text aside, based on the description of what the hot_exit
is supposed to do, it seems to be doing what it says it does; it saves projects when you close their window and the overall state when you quit the application. It doesn’t say that it remembers and restores the state of anonymous windows.
it sounds like what you actually want is a way to do that, or perhaps some sort of template that is used to set up a new window when one is created (layout, find settings, etc)?
To some degree that’s possible via a plugin, though on MacOS clicking on the dock icon when there’s no window doesn’t trigger an event that a plugin can respond to, so some trickery would be involved.