How to prevent Sublime Text 2 from opening that last open file / project when starting up

PreferenceSublimetext

Preference Problem Overview


I am on Lion - and in the command line, when I open up my project using "subl ." in my project folder - it opens up the last project I had open before I quit Sublime.

I have the Max Preference "Restore windows when quitting" unchecked.

How to I prevent this behaviour? Is there a preference setting for this?

Preference Solutions


Solution 1 - Preference

I think the behavior you want can be enabled by changing the hot_exit and remember_open_files settings. If you check out the "Global Settings - Default" preferences, there are some comments there describing these settings.

If you want to change them, you should override them in the "Global Settings - User" file to preserve your changes across updates.

Solution 2 - Preference

If anyone is wondering how to do this in sublime text 3, copy and paste the following into settings - user:

"hot_exit": false,
"remember_open_files": false,

Solution 3 - Preference

I could only get it to work by also setting "hot_exit": false in my preferences.

Solution 4 - Preference

On Linux, I had an issue where I couldn't even start Sublime Text 3 because there were too many files open and it would hang before I got a chance to change the settings.

I did what Mike Wizowski suggested and edited my $HOME/.config/sublime-text-3/Packages/User/Preferences.sublime-settings to include those settings.

However, restarting Sublime Text after this did not seem to fix my problem because Sublime still opened all the files and folders.

I found that deleting the 2 ".sublime_session" files in $HOME/.config/sublime-text-3/Local/ made Sublime Text forget what the recently opened files/folders were, thus fixing my hanging text editor.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoergView Question on Stackoverflow
Solution 1 - PreferenceSean CarpenterView Answer on Stackoverflow
Solution 2 - PreferenceMIke WizowskiView Answer on Stackoverflow
Solution 3 - PreferenceRaindogView Answer on Stackoverflow
Solution 4 - PreferenceKevinLView Answer on Stackoverflow