Sublime Forum

remember_open_files not working in Sublime 3


In Sublime 2, I could always count on my open files reappearing every time I restarted, but in Sublime 3, they are missing, even though I have remember_open_files set to true in my preferences, which I didn’t have to set in Sublime 2. In my particular circumstances, these files are stored on a virtual machine, so if my computer forcibly restarts, Sublime automatically reopens, but there is no current nfs connection to my virtual machine, so it seems to discard all of those files. This never happened in Sublime 2.



I think the setting you’re actually referring to here is hot_exit and not remember_open_files as there doesn’t seem to be such a setting for ST3 (unless it’s being provided by a Package or is not in the default settings file):

// Exiting the application with hot_exit enabled will cause it to close
// immediately without prompting. Unsaved modifications and open files will
// be preserved and restored when next starting.
// Closing a window with an associated project will also close the window
// without prompting, preserving unsaved changes in the workspace file
// alongside the project.
"hot_exit": true,

That said, this open is turned on by default already.

A little testing here on my Linux box seems to indicate that if a file is open when you quit sublime and no longer exists when you restart it, it silently closes the tab on you. So I think the problem is that without the NFS connection it thinks those files have been deleted and closes them.

I’m not sure if there’s a way around that; hopefully someone more knowledgeable will chime in. The only option that I could find that might possibly tweak that is always_prompt_for_file_reload which sort of sounds like it might at least ask you when it notices the file is missing on disk, but turning that option on has no effect.



remember_open_files has been deprecated a while ago since you usually do want that active – and when you do not, you’d rather disable hot_exit instead of disabling remember_open_files individually.

1 Like


What worked for me is "close_deleted_files" option set to true -

// When reopening Sublime Text close saved files that have been deleted from
// the filesystem (Unsaved files will not be closed). If this setting is
// false no files will be closed, instead they will be restored as empty
// files.
// This is useful when working from an unstable networked file system where
// tabs would be lost if the connection wasn't active.

"close_deleted_files": true,