Adding Sublime Text 2 Settings, Themes, and Plugins to Dotfiles

August 03, 2012

Updated: 21 January 2013

Saving all three directories under the Sublime Text 2 entry in ~/Library Application Support is overkill. You really only need to keep the ~/Library/Application Support/Sublime Text 2/Packages/User directory. Read Sublime Text 2 Dotfiles Simplified for a more complete explanation and write up.

After reading more and more about Sublime Text 2 I decided to give it a try. The first thing you do with any new software is tweak the preferences and settings to suit your needs and aesthetics. Sublime Text 2 stores settings, themes, and plugins in the ~/Library/Application Support/Sublime Text 2 directory in three separate folders:

I've already got a dotfiles repository on Github where I store all my shared configuration files. Here's how I added my Sublime Text configuration.

First close Sublime Text 2.

Next add a directory called Sublime Text 2 to the working copy of your dotfiles repository

$ cd ~/.dotfiles
$ mkdir Sublime\ Text\ 2

Move these folders from ~/Library/Application Support/Sublime Text 2 to the Sublime Text 2 directory in .dotfiles.

$ cd ~/.dotfiles/Sublime\ Text\ 2
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages .
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Packages .
$ mv ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages .

Next create symbolic links in the ~/LibraryApplication Support/Sublime\ Text\ 2 directory to the new location of the settings directories.

$ cd ~/Library/Application\ Support/Sublime\ Text\ 2
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Installed\ Packages ./Installed\ Packages
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Packages ./Packages
$ ln -s ~/.dotfiles/Sublime\ Text\ 2/Pristine\ Packages ./Pristine\ Packages

For each added machine where you install Sublime Text you will need to remove the three settings directories from their default location and replace them with links to the set in your .dotfiles repository.

Finally update the README for your .dotfiles repository with enough of these instructions to remind you what you did six months from now when you stumble upon it again.

Author's profile picture

Mark H. Nichols

I am a husband, cellist, code prole, nerd, technologist, and all around good guy living and working in fly-over country. You should follow me on Twitter.