Sublime Forum

Sublime Text 3 does not reopen my directory on start up

#1

If I were to close sublimetext with one or more directories/workspace/projects opened, the next time I opened sublimetext, those would also reopen automatically. Since about build 3075, this is no longer working as was wonder if it is an initial change or a bug. Incase it matters, my general config looks like this:

{
“bold_folder_labels”: true,
“color_scheme”: “Packages/Predawn/predawn.tmTheme”,
“default_line_ending”: “unix”,
“draw_white_space”: “all”,
“fade_fold_buttons”: false,
“folder_exclude_patterns”:

	".git",
	".svn",
	".sass-cache"
],
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"hot_exit": false,
"ignored_packages":

	"Vintage"
],
"indent_guide_options":

	"draw_normal",
	"draw_active"
],
"jsdocs_extend_double_slash": false,
"line_padding_bottom": 1,
"line_padding_top": 1,
"rulers":

	120,
	160
],
"show_encoding": true,
"show_full_path": true,
"show_line_endings": true,
"tab_size": 2,
"theme": "predawn.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true

}

0 Likes

Dev Build 3074
#2

The default value of remember_open_files got changed to false recently. If you set it to true, things will be back to how they were.

Alternatively, you can set hot_exit to true (which is the default, but it’s false in your user settings), and you’ll get the same behaviour, plus you won’t be prompted to save changes on exit: changes will be persisted in the session instead.

The default value of remember_open_files changed because I figured most people either want to have the session preserved exactly (which “hot_exit”: true does), or want to start with a clean slate (which requires both “hot_exit”: false and “remember_open_files”: false).

0 Likes

#3

Yea, I am not a fan of have my files saved on close automatically since sometimes I hit cmd+w or cmd+q by mistake and it might save things I did not want it to save. I’ll update my configuration based on your feedback, thanks.

0 Likes

#4

To clarify, it won’t save your files automatically when you hot_exit. Rather, it remembers how the files are changed the next time you open, so that you’re seeing your in-progress files just as they were when you exited. They’ll still show as dirty and you can still save them. It’s very useful. :smile:

0 Likes

#5

I see this same issue as well with a new install of version 3. The default setting is hot_exit and remember_open_files true. When I reopen sublime though it does not remember what I had opened. It also me to save files when I close it. I am on a mac with the latest version Yosemite.

0 Likes

#6

I am experiencing similar issues when declaring “remember_open_files”: true, in my user settings. It just isn’t working, I noticed that it is not defined at all in the default settings at all. Each time I start sublime all of the open files are gone.

0 Likes

#7

I have same issue but I have both hot_exit and remember_open_files set to true. I have sublime text 2 though (mac version). Please help

0 Likes

#8

Sublime Text 3 does save open and unsaved files from a folder that has actually been saved as a project by selecting Project>Save Project As…> and save it in a folder (for me in Windows 10 it was my Users/My_Name/AppData/Roaming/“Sublime Text 3” folder. Whether it matters which folder it is saved in…I do not know. I guess as long as ST3 can find it and write to it is what really matters. When the project is saved…two files are created by ST3. One is a .sublime-project file and the other is a .sublime-workspace file. These two files maintain the status of files in your working project.
I had the same problem as you until I saved my project folder as a Sublime Text Project from the menu. I left “hot_exit”: true and did not need to add “remember_open_files”: true to my User Settings as it was not mentioned in the Default Settings as a parameter to change. Hope this helps someone.
For me, my project settings were kept even through a system restart.

0 Likes

#9

I’m using Sublime 3.2.2. [Windows 10]

“remember_open_files”: false does absolutely nothing, files are still reopened on start up - I used “hot_exit”: false which gives me a blank space on startup but it isn’t exactly what I wanted.

What I really wanted was to reopen the last project on startup but without re-opening all files/tabs? It doesn’t seem possible?

0 Likes

#10

Sublime remembers either the entire state of the window (open project, file layout, open files, unsaved changes, etc) or it remember nothing at all, and both are controlled by the hot_exit setting. As such I don’t think there’s a direct way to do what you want.

Plugins can detect when there’s a project open in the current window, and they can also change the window layout and/or close and open files with impunity, so in theory a simple plugin could close any files that happen to be open when Sublime starts inside of all windows associated with a project.

There are some edge cases there, though; Sublime persists unsaved changes to files in the session information and puts the file back into the same state so you can continue where you left off, so if you had any unsaved changes you’d either be prompted to save them when you start Sublime (which is perhaps annoying) or the plugin could force them closed without saving any changes (which is perhaps dangerous).

0 Likes