Sublime Forum

Where are the texts stored?

#1

Sublime automatically keeps your texts saved, until it/MacOS crashes. Where do I look for the texts?

0 Likes

#2

The contents of buffers is stored in Sublime’s session file; you can find it while Sublime is running by using Preferences > Browse Packages from the menu or command palette to open the Packages folder. Once you do that, go up one folder level and go inside of the Local folder; the session file is there as Session.sublime-session.

Improper edits to the file may stop Sublime from being able to restore your session, so you may want to back it up before editing or just copy it away and work on the copy instead.

1 Like

#4

This file has only code related to the Sublime, not the code/text I’m working on Sublime. Might have something gone wrong in the crash/boot ?

0 Likes

#5

The session file stores the contents of files that were open and had changes but were not saved to disk when Sublime exited. It also stores things like the window layout and what files were open at the time.

So you won’t find file content in the session if it didn’t have any changes, since that can be retrieved easily by loading it from the file that was open.

If you’re using sublime-project files and have a project open in a window, it’s data is stored into a sublime-workspace file that’s stored in the same location as the project instead of in the session file.

In all cases, if you had unsaved changes but they don’t appear in the session/workspace file that would probably indicate that there was a problem of some sort; such files are not retrievable unless you happen to have a backup of some sort.

0 Likes