I’ve taken a look at the config, hot_exit is indeed defined to true.
When I’m editing a file with two columns, a file is generated called Auto Save Session.sublime_session - the file with the exact same contents are also saved when I close the window.
However, whenever I re-open it, it’s reverted to one column layout - and when I open a file - and thus re-saves the environment it, it becomes single column
This is completely different functionality to ST2.
No idea why your layout isn’t saving but if you really want a 2 column layout all the time, just create a new plugin (Tools -> Developer -> New Plugin…) with the following contents:
In fact the layout must stay as it is. I can’t tell something about MacOS, but it works as expected on Windows and Linux (ST3156). It works for me with a project opened or not. Also renamed, my session, opened ST created two column layout with new unsaved buffers, closed ST and reopened. Layout is restored as expected.
Maybe a package, which forces a certain layout upon startup? Didn’t read the issue thoroughly, but did you try with vanilla setup (no package installed)?
Just to clarify, would it be correct to state that your issue is that whenever Sublime creates a new, empty window (i.e. with no files in it), it always defaults to a single pane, but if it is restoring a previous session (i.e. with some files still present), the layout remains?
As a matter of semantic difference, I think your issue is not that Sublime isn’t saving your view layout, it’s that it’s not saving your view layout as a default layout. The distinction there is very light (and again just semantically different) and might be why you’re not getting many responses or why people think that they’re not experiencing the same problem as you (or can’t reproduce it).
The view layout of existing windows is persisted in the session file so that they can be restored at startup, but as far as I’m aware the default layout for a new window is a single pane/column and has been that way for at least as long as I’ve been using ST3 (roughly two years).
I would have guessed that there would already be an issue reported where someone was requesting the ability to set a default layout for new windows but a quick search didn’t turn up anything, although I didn’t dig too deeply.
It might be an idea to make this as a feature request, although if Sublime 2 had this feature and Sublime 3 doesn’t, it may have been dropped for some reason. In that case there may be reason for not adding it back.
All that said, as @kingkeith mentioned above it’s possible to create a plugin that will get you most of the way there. Here is a stack overflow link where someone wants something similar (two rows instead of two columns) and I there is a plugin in there that will do this in most cases.
The emphasis there is because the plugin works in two ways. First, when it is loaded (at Sublime startup) it forces a default layout on all of the windows that are currently set to a single pane. Secondly it tracks when the new_window command has just finished executing and applies the default layout to the new window.
This works nicely on Windows and Linux because on those operating systems closing the last Sublime window also has the effect of terminating Sublime. When you start Sublime again, any windows that it restores presumably have your default layout and are left alone, while if it doesn’t have anything to restore it creates a new window which will have the default applied, and then from this point forward newly created windows have the new default layout.
On MacOS it’s common for applications to remain running even when they have no visible windows, so on that OS when you close the last window Sublime remains running. At this point if you click on the dock icon it creates a new window automatically, but this doesn’t invoke the new_window command, so the plugin doesn’t know that you have a new window and does nothing.
So on that operating system and in that situation, you would need to do one of:
Manually change the layout of this new window (possibly with an extension to this plugin, which would be easy to add)
Create the first window by selecting New Window from the dock icon popup menu instead of clicking on the icon directly
Immediately create a new window with the keyboard shortcut, then close the original.
It’s also possible to change how the code works so that it could better detect new windows, but that would require constant polling of the window list to detect new windows, which due to performance concerns that plugin doesn’t currently do.
In addition to @kingkeith 's answer, you may simply install the plugin I have developed to ensure a 2-col layout.
It will work on new window instances as well.
It is super comfortable to use. Just install it and enjoy a TwoColumn layout always and automatically.
I could use a plugin, but, using a plugin to fix a regression is an awful way of doing things.
I e-mailed support to ask for either a fix for for a refund for the upgrade.
I will be more than happy to re-upgrade to ST3 once this has been fixed (as it’s a deal breaker imho), however for the moment I shall continue to enjoy the ever so delightful and reliable ST2
They approved the refund but they couldn’t find my PayPal transaction; to be fair I have nearly sat on it for nearly two weeks because of Christmas and the sheer amount of e-mails I receive
I’ll be honest, I am still disappointed that this isn’t fixed in build 3188, it’s been what, over two years since this was originally posted?
Since I’m using Windows more (gaming PC, woohoo) I’ve decided to re-upgrade to ST3 - and I took a punt at @PyBen’s plugin - and I’m chuffed to say that it worked. Just a bit apprehensive about having to rely on a plugin to fix it!
For @brayk1990 and other users, Sublime PTY refunded me the upgrade fee back in January 2018. I originally didn’t see it happening - it took me nearly a year to realise that I paid via card instead of PayPal, because reasons.
I think now is when I can finally lie ST2 to rest.