Sublime Forum

Dropbox'd install, but keeping sessions separate?

#1

I have ST2 portable installed in Dropbox, so I can use the same setup at home and at work (and lappy). I love having a consistent plugin/keybind experience.

There is one issue that kind of bothers me… Sublime’s saving of the session state. On my laptop I will have some files open or a folder in the sidebar. When I go to my desktop, of course, they are there. Even though the files don’t exist. Very annoying.

What I’m wondering, is if there is a plugin or something that can save the session state based on the computer that it’s running on. If this doesn’t exist, would it be possible for a plugin to do this? Could a plugin load up before the state, and redirect the state file to a hostname specific (or some other identifier) state file?

0 Likes

#2

If you use Package Control to install your packages, then you can just sync the Packages/User/ folder. That folder contains your settings and key bindings, plus Package Control tracks the installed packages and will install missing ones on startup.

The only thing this won’t sync is your license key.

0 Likes

#3

The actual session information is stored in Settings/Session.sublime_session, so if you keep that seperate between computers you should be fine.

I run mine by installing sublime on each computer, then symlinking Installed Packages, Packages, and Pristine Packages to my dropbox; it seems to work the best in terms of speed and ease of use.

It sounds like you have a portable version in dropbox though, so if you’re looking for a quick fix you could just selective desync the Settings folder (Dropbox Preferences -> Advanced -> Selective Sync -> Switch to Advanced view), but this wouldn’t sync your license file; so that may be an issue.

I do enjoy the way mine is setup though, if you’d like a bit more indepth tutorial on how you would set that up, I’d be happy to share :wink:

0 Likes

#4

Please note that some packages have different versions for different platforms, so you may run into bugs if you just try to sync all of your Packages folder across platforms.

0 Likes

#5

Thanks, all.

I ended up just installing ST2 on all the computers and then symlinking the Packages folder. I don’t do cross platform, I’m just working with win7x64, so I shouldn’t run into any platform issues.

What are the Installed Packages / Pristine Packages folders used for? I’m not syncing them, and as far as I can tell everything still works.

0 Likes

#6

I’ve done this too, placing the entire packages folder inside Dropbox and creating a junction (or soft links if you’re not using M$). However I ran into a couple issues that caused me to stop doing this. The biggest one is that if you try to run Sublime Text on two PCs at the same time (at work and at home) when they are joined via Dropbox causes conflicts. Dropbox responds by creating copies of conflicted files with “conflicted copy” in the filename.

I opted for a different solution. In my work I’m often using git so it seemed natural to me to place just the packages/user folder under revision. This I then pushed to github. This allows me to maintain a configuration base that I can pull and work with anywhere. Plus git allows you to see what you’ve changed and decide on a change by change basis what is pushed to your base config and what is left as workstation specific configurations without any risk of one installation upsetting another.

0 Likes