Installing Zen Coding into Sublime Text 2.. wow.. so simple but so hard to find a step by step of how to do it. I went to lots of different sites looking for a “how to” or a download link or something to get me going. I saw people suggesting a large array of different ways, none of which worked, except for this.
There could be other, or better, ways to do this, this is just the method that worked for me.
1 Install package control. Open Sublime Text 2, press Control+` to bring up the console. Paste in this command and hit enter.
import urllib2,os;pf=’Package Control.sublime-package’;ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),’wb’).write(urllib2.urlopen(‘http://sublime.wbond.net/’+pf.replace(’ ‘,’%20’)).read())
This will install package control for Sublime Text 2. When its done, restart ST2.
2 With Sublime Text 2 open again, press Command+Shift+P to access the command palette. Type “install package” and press enter.
3 Sublime will gather a list of packages available in the repos, then a popup box will allow you to scroll through the packages available. Just start typing “zen coding” and it will select it. With the Zen Coding package selected, press enter.
That’s it. Why it took so long to find a way to do it that worked, I have no idea. I hope this helps someone else out so you don’t have to fight with it as long as I did.