Recently I had to set up 2 of my machines for development with a completely fresh OS X install and I happily took that opportunity to install the new beta version of my favourite code editor, Sublime Text 3.
As getting ST3 up and running is a bit more complex than installing version 2, I decided to write a quick guide, which contains all the necessary steps, so I can save myself from chasing up numerous websites, blogs and git repos for the beta install notes.
This is a guide I wrote for myself, but in hope of helping others I am sharing it here :)
Step 1 - Install Sublime Text 3
That's super easy, go to http://www.sublimetext.com/3, download and install the latest version of the app.
Step 2 - Setting up Sublime for the command line
I like to set Sublime as the default code editor in my shell, so that I can use it straight from Terminal.
Create a symbolic link to the app using Terminal:
$ sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin
Set Sublime as the default editor in
export EDITOR="subl -w" export BUNDLE_EDITOR="subl"
Step 3 - Adding Package Control
I've found that managing packages is best with
Package Control. It's a bit more extra effort to make it work with Sublime 3, as it's not yet compatible with the newest version out of the box. You will need to get the latest source using Git and clone it into Sublime's
Packages folder, and finally checkout the
python3 branch, which will then work beautifully after restarting Sublime:
$ cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ $ git clone https://github.com/wbond/sublime_package_control.git "Package Control" $ cd "Package Control" $ git checkout python3
To bring Package Control up, press CMD + SHIFT + P.
Step 4 - Installing packages
In the next few steps I'll talk about installing my favourite packages - which is not much as I am pretty minimalistic with the amount of packages I am using. For a more comprehensive list of ST3 compatible packages visit this page.
Update: I again had to install ST3 and when I installed Sidebar Enhancements via Package Control it worked out of the box, so the below workaround won't be necessary anymore. I'll leave it to stay on the safe side though.
I love the extra functionality of the sidebar contextual menus, which comes with SidebarEnhancements. This is one of the packages, that won't work properly with ST3, but with some Gitting we can make it work:
$ cd Library/Application\ Support/Sublime\ Text\ 3/Packages/ $ git clone -b st3 git://github.com/titoBouzout/SideBarEnhancements.git "SideBarEnhancements" $ git checkout st3
Tomorrow Color Schemes
I've found Tomorrow Night to be my favourite color scheme for editing code for Sublime (I also use it in Terminal). It can be installed through Package Control, search for
Tomorrow Color Schemes.
After installation the theme should be added to Sublime, and should be accessible through:
Sublime Text / Preferences… / Color Scheme / Tomorrow Color Schemes
Whenever working on a Git repository I like to use some sort of 'gutter' tool, which shows me the changes right next to my code in Sublime for every deletion/addition or modification for each of the open files. To install it type
Modific in Package Control.
Levels in Package Control.
Of course as soon Sublime 3 becomes final all packages should be much simpler to install (and this guide eventually will become obsolete), but for the time being I hope this little note helps others to get around the installation process.