
I would like to synchronize my entire Sublime Text 3 between my desktop and laptop.
I use Ubuntu on both machine. I think if I just sync the entire /home/<username>/.config/sublime-text-3
folder with Unison
, I can continue the work on the other machine. Even if I don't save the files. Of course the saved files will sync too.
Will the plugin-manager work correctly? So if I install a plugin with the manager on the desktop and I sync, will it work perfectly on the laptop?
Can I do this? Should I ignore some files or sync others?
решение1
Yes, there is a plugin called Package Syncing which aims to do what you want to, relying on 3rd party applications as dropbox, SkyDrive or Google drive.
There are other options to achieve this goal more manually than with package syncing, but in none of this options use the "simple" solution of rsync both machines and directories but it seems that you could rsync only a directory and it will work.
The proper solution is to sync only the Packages/User/ folder. This folder contains the Package Control.sublime-settings file, which includes a list of all installed packages. If this file is copied to another machine, the next time Sublime Text is started, Package Control will install the correct version of any missing packages.
решение2
Yes, this should work fine. The most important directories as far as user experience are concerned are Installed Packages
and Packages
, as those contain the plugins which give Sublime its language-specific functionality, as well as any additional add-ons you install. Cache
, Index
, and Backup
are pretty obvious, and can be regenerated on any machine. I'm not sure if there would be any added benefit to syncing them. Local
contains files like the software's license (you have registered, haven't you?) and the current session, which may be valuable if you want to close Sublime on one machine and open it exactly like it was on the other machine, assuming your working files are located in the exact same place.
So, syncing is definitely a good idea. I only sync Packages
and Installed Packages
between machines, but you'll have to see for yourself what works best for you.