Sync Settings, is a cross-platform solution to keep the Sublime Text configuration updated.
##How works?
Sync Settings uses Github-Gist allowing you to use all features that this service provides.
##Support
- Working on Windows, Linux and OSX
- Working on Sublime Text 2, Sublime Text 3
##Installation:
- Install Package Control
- Open Package Control and looks for Sync Settings
##Configuration
- Creates an access token in GitHub
- Paste token in configuration file
Preferences > Packages Settings > Sync Settings > Settings - User
####Options
- access_token: Access token provided by GitHub
- gist_id: Identifier of the gist that will be used for the synchronization
- auto_upgrade: If it is activated, your settings will be upgraded on startup (Download command)
- excluded_files: It is a list with all files that will be ignored by the plugin at the time of upload or download. You can exclude by folder name, file name and/or file extension.
/**
* Excluded files example:
* Note: Considers that each excluded item will begin with /Path/to/Sublime Text/Packages/User/
*/
{
"excluded_files": [
".txt",
"SublimeLinter",
"awesome_file.py",
"path/to/other/awesome/file.py"
]
}
- included_files: It is a list with all files what will be included by the plugin at the time of upload or download. You can include by folder name, file name and/or file extension.
/**
* Included files example:
* Note: Considers that each include item will begin with /Path/to/Sublime Text/Packages/User/
*/
{
"included_files": [
".txt",
"SublimeLinter/some_file.py",
"awesome_file.py",
"path/to/other/awesome/file.py"
]
}
##Commands
- Create and Upload: Creates a new gist and upload your settings. The Gist identifier will be included in
Preferences > Packages Settings > Sync Settings > Settings - User
if you accept the prompt message. - Delete and Create: Deletes the current gist and create a new with your settings.
- Upload: Upload your settings files, excluding the files included in "excluded files" option.
- Download: Download your settings files, overwriting the existing files, after downloaded your files Sublime Text need to be restarted.
- Delete: Deletes the current gist.
- Show Logs: Open a new view with the log file content.
##Tests
You can run and add new tests using the following instructions. For more information consulting the framework documentation.
###Requirements
For running the tests, you need install the dependencies pip install -r requirements.txt
and python 2.7+. Also, it is necessary create an environment variable called SYNC_ACCESS_TOKEN
.
###Run tests
# Linux/OSX
export SYNC_ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
# Windows (Run as Administrator)
setx SYNC_ACCESS_TOKEN "<YOUR_ACCESS_TOKEN>" -m
#Run all tests
python -m unittest discover -s ./tests/libs
#For run an specific test just add the `p` flag
python -m unittest discover -s ./tests/libs -p test_<name>.py
###Add Tests
touch test_<name>.py #Create a new file
#Example:
from unittest import TestCase
class TestExample(TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_<name>(self):
self.assertFalse('bar'.lower(), 'BAR')
##Issues?
If you find errors in the plugin, you can to execute "Show Logs" command and report a new issue with the file content.
##Changelog
You can check the changes to this plugin here
##Donate
You are welcome support this project using Paypal