14

I've got a problem with Sublime Text 2 in that when I start it it automatically tries to load a file that leads it to crash.

I can see that there are ways of changing the settings once it's loaded - how do I fix it when it won't finish start-up?

I'm running on Mac OSX (Mavericks).

6 Answers 6

35

For Sublime 3

  • on Mac, Auto Save session exists in this path ~/Library/Application Support/Sublime Text 3/Local. Just go to this path delete all the files. Sublime will start working fresh.

  • On Linux, Auto Save session exists in /home/<USER>/.config/sublime-text-3/Local. Delete all the files you'll be good to go fresh.

  • On Windows the path is %APPDATA%\Sublime Text 3\Local

Sign up to request clarification or add additional context in comments.

4 Comments

That saved a lot of head banging against the desk! Thanks! For others having this problem under Linux: The path is /home/<USER>/.config/sublime-text-3/Local
This happens to me all the time with ST3 on Linux. The thing I don't like about this is losing all unsaved buffers I had. Really annoying... :/
This seems to happen as well when you try to open a folder in Sublime Text that has an extremely large amount of files (i.e. trying to open ~). I would suspect it has to do with Sublime trying to index all of the files. Clearing your session also works in this case as Sublime will no longer default to that massive directory. In this case, you can also simply edit the Session.sublime_session file in the above-mentioned directory and remove all of the entries in the "folder_history" object.
On Windows, this is %APPDATA%\Sublime Text 3\Local.
6

You can try hunting around for the file causing the error. However, I'd recommend reverting your install (link) though rather than deleting, I'd just move it somewhere temporarily. Be sure to move your User folder out. After reverting, move the User folder back. If you used package control, it will grab all of the installed plugins again. If you didn't you will need to move those back manually. If it's a particular file that's causing issues (not a plugin) then you could also edit the Session file. It's a bit more involved but can be found in Application Support/Sublime Text 2/Settings.

If you could post the file causing the issue, we could probably tell you how to fix put it back into a working state. If it's a settings file, it might be as simple as malformed json. I'm unsure though as you didn't give much detail on the actual error.

1 Comment

That's great. The problem file was just one that was too big and caused ST to hang. I just swapped out the data file, tweaked the Session file and then swapped it back.
6

So, I deleted both the Session.sublime_session and the Auto Save Session.sublime_session in the Settings folder and that allowed me to get it to run and not crash on startup.

1 Comment

On a Linux Mint 17 Sublime text 3 these files are located ~/.config/sublime-text-3/Local/
1

Delete Session.sublime_session from ~/Library/Application Support/Sublime Text 3/Local.

rm ~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session

Also: Please don't delete all content in the ~/Library/Application Support/Sublime Text 3/Local folder as this will also delete your Licence. @kushdilip (Tried to add this as a comment to your post but didn't have enough reputation to do so.)

2 Comments

This should be a comment, not an answer.
I know. Didn't have enough reputation though. Edited my post. Thanks @ThomasFritsch
0

I would recommend using another text editor (such as using vim in the terminal) to view/edit the files in:

~/Library/Application Support/Sublime Text 2/Packages/Default/Preferences.sublime-settings 

There are two other directories, but Default is probably where you want to start.

~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings ~/Library/Application Support/Sublime Text 2/Packages/Vintage/Preferences.sublime-settings 

(Make a backup before changing any files around!)

2 Comments

I can find Application Support but can't find the Sublime Text 2 directory. Any ideas? (I appreciate your help :) )
I'd strongly discourage editing the default preferences files. You can make the same changes in the user folder and the items in the user folder will take precedence. This will keep you from messing up the default settings.
0

For subline text 2 on my Mac: There is no directory named Local under ~/Library/Application Support/Sublime Text 2/, but there is strange hidden file .DS_Store, I remove it and sublime text don't crash anymore!

enter image description here

$ rm .DS_Store 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.