Home Download Buy Blog Forum Support

Dropbox'd install, but keeping sessions separate?

Dropbox'd install, but keeping sessions separate?

Postby nullifi on Mon Dec 17, 2012 5:51 pm

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?
nullifi
 
Posts: 8
Joined: Wed Feb 22, 2012 6:20 pm

Re: Dropbox'd install, but keeping sessions separate?

Postby wbond on Mon Dec 17, 2012 8:15 pm

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.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Dropbox'd install, but keeping sessions separate?

Postby mazzzzz on Mon Dec 24, 2012 5:07 pm

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 ;)
mazzzzz
 
Posts: 7
Joined: Fri Aug 03, 2012 5:37 pm

Re: Dropbox'd install, but keeping sessions separate?

Postby wbond on Fri Dec 28, 2012 5:41 am

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.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Dropbox'd install, but keeping sessions separate?

Postby nullifi on Mon Dec 31, 2012 6:51 pm

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.
nullifi
 
Posts: 8
Joined: Wed Feb 22, 2012 6:20 pm

Re: Dropbox'd install, but keeping sessions separate?

Postby phazeonphoenix on Thu Jan 03, 2013 6:46 pm

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.
phazeonphoenix
 
Posts: 1
Joined: Thu Jan 03, 2013 6:29 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], henry_t and 21 guests