ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Package​Sync

by utkarsh9891 ST2/ST3

Sync sublime text packages & user settings across devices.

Details

Installs

  • Total 9K
  • Win 4K
  • OS X 3K
  • Linux 2K
Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9
Windows 4 8 8 4 11 12 9 10 4 3 2 4 10 8 13 2 4 2 7 6 4 5 7 5 7 3 5 6 6 2 2 5 9 14 5 6 5 5 5 13 8 11 10 9 8 5
OS X 0 8 5 4 12 7 6 9 4 5 4 6 3 6 4 3 0 6 5 9 7 4 1 2 6 2 7 6 7 6 3 1 0 3 10 7 6 0 4 7 5 9 16 10 3 11
Linux 3 2 4 4 0 5 4 3 1 6 0 1 7 1 2 4 4 2 4 5 2 6 1 3 1 0 1 3 4 2 0 1 2 3 1 4 1 4 2 4 2 7 4 11 4 3

Readme

Source
raw.​githubusercontent.​com

PackageSync

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.

Table of Contents

Features

Backup/Restore

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.

  • Backup/Restore via a Zip file (Recommended) - Backs up the installed packages list & their settings into a zip file. The zip file is the best portable format for offline syncing.
  • Backup/Restore via folder - Works the same way as the zip file, with the only difference that the contents are placed in a folder instead of an archived zip file.
  • Backup/Restore only Package List - Backs up only the installed packages list to a file. User settings for packages are ignored in this option.

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.

Sync Online

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.

OnlineSyncFolder

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.

Usage

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.

Settings

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 file SublimePackagesBackup.zip on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.

  • folder_backup_path [string]
    The folder path to use for backing up or restoring package list & user settings.

    "prompt_for_location" = false & "folder_backup_path" = ""
    This combination backs up & restores using the folder SublimePackagesBackup on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.

  • list_backup_path [string]
    The file path to use for backing up or restoring only the package list.

    "prompt_for_location" = false & "list_backup_path" = ""
    This combination backs up & restores using the file SublimePackagesList.txt on the current user's Desktop. During backup operation, it also overrides any existing backup at this location without confirmation.

  • ignore_files [array]
    The list of files to ignore when backing up.
    It supports wildcarded file names as well. Supported wildcard entries are '*', '?', '[seq]' & '[!seq]'. For further details, please see the fnmatch documentation.

    Files ignored by default are *.DS_Store, *.last-run, Package Control.ca-list, Package Control.ca-bundle, Package Control.system-ca-bundle & *.sublime-package.

  • include_files [array]
    The list of files to include when backing up.
    Note: ignore_files holds higher priority as compared to include_files. So a file matching both the settings would essentially be ignored, as governed by ignore_files.
    It supports wildcarded file names as well. Supported wildcard entries are '*', '?', '[seq]' & '[!seq]'. For further details, please see the fnmatch documentation.

    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.

  • ignore_dirs [array]
    Directories to ignore when backing up.
    By default, all directories created by other packages are included. Only the directories specified in this list are ignored while syncing.

    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.

Installation

Package Control

The preferred method of installation is via Sublime Package Control.

  1. Install Sublime Package Control
  2. From inside Sublime Text, open Package Control's Command Pallet: CTRL SHIFT P (Windows, Linux) or CMD SHIFT P (Mac).
  3. Type install package, select command Package Control: Install Package and hit Return. A list of available packages will be displayed.
  4. Type PackageSync, select the PackageSync package and hit Return. The package will be downloaded to the appropriate directory.

Manual Installation

  1. Download or clone this repository to a directory PackageSync in the Sublime Text Packages directory for your platform:
    • Mac: git clone https://github.com/utkarsh9891/PackageSync.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/PackageSync
    • Windows: git clone https://github.com/utkarsh9891/PackageSync.git %APPDATA%\Sublime/ Text/ 3/\PackageSync
    • Linux: git clone https://github.com/utkarsh9891/PackageSync.git ~/.Sublime\ Text\ 3/Packages/PackageSync
  2. Restart Sublime Text to complete installation.

The features listed above should now be available.

Feedback

Please use the form PackageSync Feedback for providing any Feedback or Suggestions or for reporting Issues that you face while using or installing PackageSync.

License

All files in this package are licensed under the MIT license. See the LICENSE file for license rights and limitations.