Having received a bunch of comments on my previous post explaining how to setup sublime text for web development asking me to just write a completely new one for Sublime Text 2 as quite a few things have changed.
So Sublime Text 2 is currently out for beta, you can get it here, and if you bought a licence for the first version you’ll be happy to know it will still work. There have also been some changes on the plugin front, some good and bad. Sadly the WebDevelopment plugin is no longer available, but I feel that the functionality of Zen Coding is sufficient to fill this gap. The good news is there is a swanky new plugin called Package Control.
Package Control does exactly what it says on the tin. It allows you to search, browse and install packages (plugins) available for Sublime Text. It will also keep them all up to date without you having to lift a finger. Literally the hardest part is installing it, and even that is easy:
- Open up Sublime Text and press ctrl+` which will bring up the console at the bottom of sublime.
- Next up you want to copy and paste the following into the console:
import urllib2,os; pf=’Package Control.sublime-package’; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),’wb’).write(urllib2.urlopen(‘http://sublime.wbond.net/’+pf.replace(‘ ‘,’%20’)).read()); print ‘Please restart Sublime Text to finish installation’
Then hit enter.
- When it has finished downloading and installing it will ask you to restart sublime. Do this.
Installing ZenCoding is now very simple. First we want to bring up the package control dialogue. On Windows go to Preferences -> Package control, on Mac click Sublime Text 2 -> Preferences -> Package Control.
Click Install package and you will be presented with a list of available packages for sublime. We want ZenCoding so you can either scroll down to the bottom of the list, or just start typing “zen” to search for the package. Click on the one you want and woosh, it will install.
Feel free to ask any questions and let me know if you think ZenCoding is alright on it’s own without the old WebDevelopment plugin.