Sync sublime text packages & user settings across devices.
Synchronize your Sublime Text packages and your user-settings across different devices effortlessly. For this, PackageSync requires an online syncing application like Google Drive, Dropbox or SkyDrive installed on your devices.
Alternatively, PackageSync also allows you to take portable backups of your packages & restore them on the same or any other machine without any need for third party applications mentioned above.
This allows you to backup the installed packages list & the user settings for each package. This backup can then be restored to any other device using PackageSync.
The user-setting file for PackageSync (PackageSync.sublime-settings) is never synced.
Do note that this Backup/Restore operation only syncs your packages list and your user settings offline. But the actual installation of missing/new packages requires a working Internet connection.
Also, while restoring from PackageSync backup, please ensure that all *.sublime-settings
files are closed. Files in open state would interrupt the restore operation, resulting in unforeseen errors.
This allows you to sync the packages & user settings in real time across different devices. For this, the installed packages list & user settings are be saved to & synced via a folder monitored by Dropbox, Google Drive or SkyDrive etc.
First Machine
Turn on PackageSync's online syncing module by setting the sync folder via "PackageSync: Sync Online - Define Online Sync Folder" from the command palette or Tools menu. In the ensuing input panel, give the complete path to any directory on your computer inside your Dropbox or Google Drive sync folder.
Second Machine (or after a fresh installation of Sublime Text)
On your second machine please wait until all the backup files are available and then simply set the sync folder and PackageSync will automatically pull all available files from that folder. The following message dialog should appear which you just have to confirm.
Restart Sublime Text & Package Control will check for missing packages and install them automatically. From now on everything should work very smoothly.
Note: For PackageSync to automatically manage installation & removal of packages (without requiring any restart) as per sync or restore operation Package Control needs to be installed as well. Otherwise, installation or removal would require restart of Sublime Text.
The commands are available under the menu Tools -> PackageSync
.
Alternatively, from inside Sublime Text, open Package Control's Command Pallet: CTRL+SHIFT+P (Windows, Linux) or CMD+SHIFT+P (Mac) & search for PackageSync:
to get the list of available commands.
PackageSync provides the following user configurable settings:
prompt_for_location [boolean, true by default]
Decides if the user is asked for providing location to back up to or restore from.
If set as true, user is prompted every time for a path upon back up or restore operation.
If set as false, the location specified in settings is used. If no location has been specified in settings, by default user's desktop is used for backup.
zip_backup_path [string]
The zip file path to use for backing up or restoring package list & user settings.
"prompt_for_location" = false
&"zip_backup_path" = ""
This combination backs up & restores using the zip fileSublimePackagesBackup.zip
on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.
"prompt_for_location" = false
&"folder_backup_path" = ""
This combination backs up & restores using the folderSublimePackagesBackup
on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.
"prompt_for_location" = false
&"list_backup_path" = ""
This combination backs up & restores using the fileSublimePackagesList.txt
on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.
Files ignored by default are *.DS_Store, *.last-run, Package Control.ca-list, Package Control.ca-bundle, Package Control.system-ca-bundle & *.sublime-package.
PackageSync.sublime-settings
).Caution: Use this feature very cautiously. This overrides your PackageSync settings across the synced devices. If you wish to keep different sync folder paths across the devices, DO NOT set this as True
The user settings for PackageSync (PackageSync.sublime-settings) would never be synced, even if added to this list.
Files included by default are *.sublime-*, *.tmLanguage, *.tmTheme, *.tmPreferences, *.json, *.png, *.txt, *.py, *.md.
Do note that an "include_dirs" option has not been provided on purpose.
This has been done in order to avoid confusion for the user when syncing across OSX, WIN & LINUX mahcines as path would be different across all machines of the same user.
preserve_packages [boolean, true by default]
Decides if the existing packages are to be preserved while restoring from a backup.
If set as false, existing packages & their settings are removed during restore operation. Only the packages included in the backup are restored.
If set as true, PackageSync keeps the existing packages intact. Packages not included in the backup therefore remain unharmed even after restore operation. However, user-settings are overwritten if the backup contains user-settings for the same package.
online_sync_enabled [boolean, false by default]
Toggle to determine if online syncing is enabled or not.
Turning this toggle ON/OFF requires Online Sync Folder to be setup first.
online_sync_folder [string]
Folder to use for syncing the backup with online syncing services.
This should be the path to a folder inside the Google Drive, Dropbox or SkyDrive sync folder. Any other online syncing application can be used as well.
online_sync_interval [integer, default 1]
The frequency (in seconds) at which PackageSync should poll to see if there are any changes in the local folder or in the online sync folder.
PackageSync will keep your settings up to date across machines by checking regularly at this interval. If you face any performance issues you can increase this time via the settings and a restart of Sublime Text.
debug [boolean, false by default] Whether or not PackageSync should log to the console. Enable this if you're having issues and want to see PackageSync's activity.
The preferred method of installation is via Sublime Package Control.
install package
, select command Package Control: Install Package
and hit Return. A list of available packages will be displayed.PackageSync
, select the PackageSync
package and hit Return. The package will be downloaded to the appropriate directory.PackageSync
in the Sublime Text Packages directory for your platform:
git clone https://github.com/utkarsh9891/PackageSync.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/PackageSync
git clone https://github.com/utkarsh9891/PackageSync.git %APPDATA%\Sublime/ Text/ 3/\PackageSync
git clone https://github.com/utkarsh9891/PackageSync.git ~/.Sublime\ Text\ 3/Packages/PackageSync
The features listed above should now be available.
Please use the form PackageSync Feedback for providing any Feedback or Suggestions or for reporting Issues that you face while using or installing PackageSync.
All files in this package are licensed under the MIT license. See the LICENSE file for license rights and limitations.