22

enter image description here Everytime i open Sublime , these tabs automatically opens. How do i fix this. I am unable to find any setting for this.

BigSack
  • 2,623

3 Answers3

49

There is actually a better solution implemented in Sublime Text. Select Preferences-> Settings - User and set remember_open_files and hot_exit to false. The resulting file should look like this:

{
    "remember_open_files": false,
    "hot_exit": false
}

(All the possible settings can be seen in Settings - Default.)

Just restart Sublime Text afterwards (it may be required to restart the program two times, one time to apply the settings) and it should start up without any open files.

Note: I only was able to test this with Sublime Text 3, but I am pretty sure that this settings exist in version 2 as well.

  • 4
    this is the right answer ( it also work on sublime 3 ) – Postadelmaga May 09 '14 at 21:49
  • 2
    Although this is correct, this does not help if Sublime Text crashes on start-up. – Wok Jul 18 '14 at 14:06
  • What is the difference between the two: remember open files and hot exit? Because if I have hot_exit set to true, then the condition "remember_open_files" seems to be automatically satisfied (i.e. true hot_exit will also keep the open tabs :) – Jim Raynor Mar 26 '15 at 16:29
18

Sublime Text 2

Check the content of the directory ~/.config/sublime-text-2/Settings for a file called Session.sublime_session

If those files are included in there, remove them

Sublime Text 3

ST3 stores the session files under:

~/.config/sublime-text-3/Local/Session.sublime_session
Glutanimate
  • 21,393
  • Unfortunately ST2 seems to create that file again. I solved that creating an empty file with read only permissions. Thanks. – Salem Mar 06 '13 at 15:44
  • It looks like the files been renamed Auto Save Session.sublime_session, so to rm its rm -f ~/.config/sublime-text-3/Local/Auto\ Save\ Session.sublime_session – megawac Dec 22 '15 at 21:33
  • ~/.config/sublime-text-3/ does not exist? – 2540625 Jun 08 '16 at 17:42
  • How can This be done on windows? – pal4life Aug 01 '16 at 19:31
  • This solution worked for me: http://stackoverflow.com/a/29236116/755405 – W1M0R Sep 24 '16 at 20:20
  • 1
    On Windows, it's "%APPDATA%\Sublime Text 3\Local\Session.sublime_session" – masterxilo Mar 11 '18 at 21:16
  • 1
    Thank you. I opened huge file with my Sublime Text and it crashed Sublime everytime open any sublime instance. Removing the sublime_session help me to use the sublime text again – Ardiya Jul 29 '21 at 01:51
1

In Sublime Text 3, below worked for me.

$ rm ~/.config/sublime-text-3/Local/Auto\ Save\ Session.sublime_session

BTR Naidu
  • 169
  • 1
  • 9