After my last blog post on Fetch & Sublime, I thought let’s give another nice hint on how to get the most out of Sublime Text 2.
Sometimes you work on Windows, sometimes on Mac or Linux or just on another computer but you still want to use the settings, themes and set of plugins everywhere. One of the easiest ways to do this is to use your DropBox account.
DropBox is basically just a regular folder on you computer that syncs to the cloud. The first 2 GB are free so if you use it to store documents you’re fine with the 2 GB. You can however buy more space if required. By inviting friends you can increase your Dropbox size (friend invite link). Trust me it’s worth it, once you have Dropbox you wonder how you could live without it all these years.
The nice thing about Dropbox is it has versioning build right in, so even if you accidentally delete a file you can get it back. Not only that you can set up shared folders to share documents between 2 or more people and even public folders to share with any internet user.
Ok but let’s go back to Sublime Text 2.
One thing you could do is store your projects on your DropBox account that way all your projects are synced across all your devices. But you could also store your settings, themes and plugins on DropBox.
How does it work?
On OS X
- First close Sublime Text 2
- In your Dropbox folder (usually it’s at “
~/Dropbox/"), add a folder called “
Sublime Text 2"
- Go to your Sublime Text 2 settings (this is usually at “
~/Library/Application\ Support/Sublime\ Text\ 2/")
- Copy the following 3 folders into “
~/Dropbox/Sublime\ Text\ 2/ "
- Rename the 3 original folders in “
~/Library/Application\ Support/Sublime\ Text\ 2/
"or delete them.
- Next go back to Terminal
- From the command line type “
cd ~/Library/Application\ Support/Sublime\ Text\ 2/"
"ln -s ~/Dropbox/Sublime\ Text\ 2/Installed\ Packages ./Installed\ Packages"
"ln -s ~/Dropbox/Sublime\ Text\ 2/Packages ./Packages"
"ln -s ~/Dropbox/Sublime\ Text\ 2/Pristine\ Packages ./Pristine\ Packages"
Start Sublime Text 2 and you’ll be linked to Dropbox.
On your other devices do
"mv ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User /tmp"
"ln -s ~/Dropbox/Sublime\ Text\ 2/Packages/User ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User"
you can probably figure out the first part but for the symlinks you can use the syntax below:
mklink /D "Installed Packages" "C:\path\to\Dropbox\appdata\sublime\Installed Packages"
mklink /D "Packages" "C:\path\to\Dropbox\apps\sublime\Packages"
mklink /D "Pristine Packages" "C:\path\to\Dropbox\apps\sublime\Pristine Packages"