# Sublime Text, getting configuration under version control

After using vim for the better part of a year I've decided to give Sublime Text 2 a whirl.

Using vim my .vimrc of course grew quite substantial since I constantly found small ways to modify it, I ended up putting my .vim under version control.

I've been using Sublime Text for a few weeks now, installing several plugins, and as I'm exploring plugins and configurations I get a blistering headache trying to keep my work machine (Windows) and my home machine (Linux) in sync.

So, how do I get my configuration back under (version) control?

-

Here is a way I've done it myself:

1. Install Dropbox or Ubuntu One on both systems. In the following steps it will be assumed that you have installed Dropbox with default directory layout.
2. Assuming you have the up-to-date settings on Linux, move there the ~/.config/sublime-text-2/Packages directory to ~/Dropbox/.config/sublime-text-2/Packages and create the following symlink:

ln -s ~/Dropbox/.config/sublime-text-2/Packages ~/.config/sublime-text-2/Packages

3. On Windows remove the %UserProfile%\AppData\Sublime Text 2\Packages directory and in place of it create a symlink pointing to %UserProfile%\Dropbox\.config\sublime-text-2\Packages by running:

mklink /d "%UserProfile%\AppData\Sublime Text 2\Packages" %UserProfile%\Dropbox\.config\sublime-text-2\Packages


Please note that the commands are only provided for reference and I haven't tested them.

-
Warning: do not create git repositories in DropBox. –  Mahmoud Al-Qudsi Apr 22 '12 at 16:01
@MahmoudAl-Qudsi Firstly, what does it have to do with my answer and secondly why not? –  Nikita Volkov Apr 22 '12 at 16:03
The OP mentioned version control as well as sync. Placing a git repository in a DropBox folder results in corruption of the git database. Same for mercurial. It'll work well for a while, but if it updates as you're saving, it'll be left in an inconsistent and irrecoverable state. –  Mahmoud Al-Qudsi Apr 22 '12 at 16:06
I couldn't run mklink /d as a regular user, but mklink /j seems to have worked fine after I made sure that directory was not read only. –  mehaase Apr 24 '12 at 13:14
This question has a lot more information about possible git corruption with Dropbox. Most people seem to think it's worth the risk. –  Annan Oct 26 '12 at 16:40