Sublime Forum

Expected behaviour of Projects

#1

Hi

I got the impression from a quick test I did, that if I opened a project, it would automatically update, so if ST3 closed I could just re load my project and voila.

Am I incorrect in this assumption? I have/had a ST3 window open on multiple Linux-workspaces (LW) (each instance of ST3 has four files open, I need to do a lot of cross-ref).
My main ST3 window shut for some reason (it might have been a bad key press on my part, or some other thing).
When I clicked on the ST3 icon on my now empty LInux-workspace (LW) (Not ST3-workspace) I was just taken to another open ST3 window on a different LW.

Firstly is this expected behaviour ?

So I had to go over to the other open ST3 window, hit crtl+shift+n, drag it over to my empty LW and then reload my project.

But this only contains the files when I saved it yesterday(fortunately i backup, manually, my work)

Does this mean that I have to manually save the project as well as the file I’m working on (say every ten minutes)?

Surely it would make more sense that ST3 project update themselves so that when this kind of this happens you don’t loose everything in case you’ve forgotten to save. It’s like being back in the 80’s !

Guilty feet have got no rhythm
Though it’s easy to pretend
I know you’re not a fool…

Should’ve known better than to cheat a friend
And waste the chance that I’d been given
So I’m never gonna dance again
The way I danced with you

(One for the younger viewers there)

Thanks, all the best.

Ps Really I just love this forum (and I’ve got a bit of a man crush on @OdatNurd too, as it is he the bears the brunt of my continual wrestle with ST3)

0 Likes

#2

All windows in Sublime have project data associated with them of some kind or other (generally the list of folders you’ve opened). However unless you associate that data with a file on disk by using Project > Save Project, it’s considered “anonymous” project data and will go away when the window is closed.

Saving the project gets you a sublime-project file, and Sublime will also create a sublime-workspace file as well. The project file stores the folders and settings of the project and the workspace stores the window layout. You only have to do this once per project; as long as the project is open in the window, closing the window will persist the state of that window into the workspace file (including not only files you had open but also unsaved changes).

For this to work, hot_exit needs to be turned on.

All else being equal, so long as you saved the project, closing the window at any point is fine (you don’t need to save the project a second time, unless you want a second copy of it). If re-opening the project doesn’t take you back to where you were, something is wrong.

I have a video on projects and workspaces that covers this (I seem to have videos for everything these days :wink:)

0 Likes

#3

Thanks for your reply, I guess something is wrong, as I’m intermittently not getting the behaviour you describe.
hot_exit is set to true.
I’ve just done another test and got the expected behaviour. But deffo didn’t have it this afternoon. Hmmm could it be to do with my broken desktop icon…unlikely ???

Any way I know what i should be getting, cheers

0 Likes

#4

Everything now seems to be working. Cheers.

Am going through all my posts, to see what is still outstanding and then go to my virgin build and see if the stuff that doesn’t work, does work on that. And hitting the solution box if anything is solved for completeness…

1 Like