Sublime Forum

Sublime Text X 20101230

#21

[quote=“sublimator”]I tend to have a certain group of files always open, no matter what project I’m working on.

Is it possible if I have different ‘sessions’ of them at the same time I’ll have versioning issues? It’s possible I’ll lose changes if I forget to save any modifications stored only in the session?[/quote]

If you have the same files open, and modified, in multiple projects, then each project will have its own copy of the file. You wont lose changes, but it is possible to clobber them on save: Imagine having two projects, both with the same file open, and each having different unsaved changes. If you save the file with project A open, then switch to project B, then you won’t see the just saved changes, as you’ll still have the copy within project B visible. At this point, you can either hit undo, which will revert to the on disk version, or hit save, which will clobber the on disk version.

Storing all modified buffers centrally is possible (i.e., so if the one buffer is open in two projects, the contents will be mirrored), but I’m not entirely keen on this approach - it would mean unsaved changes to a file in one project spread to that file in every other project, which may also not be what you want.

0 Likes

#22

A counter example is having an experimental set of changes to a shared file (say, you’re in the middle of rearranging some functions), and while mid-way through, you want to switch to another project and make a one line change: it this case, you wouldn’t want the unsaved changes in the first project to propagate to the second project.

I could add an option to prompt to save changes when switching projects… shrug

0 Likes