Sublime Text 2 / Sublime Text 3 bring back unsaved files on osx

筅森魡賤 提交于 2019-12-04 23:52:08
mcw0933

Sublime Text 2 stores the files in ~/Library/Application Support/Sublime Text 2/Settings, in the .sublime_session files that are located there.

The contents of those files are a large JSON blob that contains the individual tab contents. Search in the file for the file name / tab name / a key word in the document and you should be able to get what you need.


For Sublime Text 3, use the following path:

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

Credit to: eebbesen

I know it's a late answer but here's where I found it.

Linux: ~/.config/sublime-text-3/Local/Session.sublime_session

Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session

Hope this helps someone someday.

As far as I know, Sublime Text keeps open files when you quit the application. However, if you close the tabs or project window without saving, the changes are lost.

In the former case, the files are saved in Local/Session.sublime-session (I'm using ST3 though, could be different in ST2!) You can open ST's packages folder from the command palette using "Browse Packages".

For Sublime Text 3,

Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!