After searching for about 6 or 8 months, I've finally found a way and managed to install Zen Coding in my Sublime Text Editor. Here's how you can do it as well. Oh, by the way, I'm a Windows 7 (32-bit ) user.
Note: You need to install the Package Control, inside Sublime Text 2, if you want to follow the steps mentioned below. In case you don't know how to install it, here's a quick overview.
Access the Sublime Console by pressing the CTRL+ ` shortcut keys. Once opened, paste the
following code/command 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'
- Open Sublime Text 2 and Press Shift + Ctrl + P (in Windows) and Shift + Cmd + P (for Mac). This will open the Command Palette inside Sublime (see the screenshot below). Alternatively, you can access the Command Palette by going to Tools > Command Palette.
- Inside the Command Palette type Package install. You'll see an option that says Package Control: Install Package (see the screenshot below). Just Press Enter and wait until Sublime loads a list of Packages (it'll hardly take 3 to 4 seconds)
- After you press the Enter key, your Command Palette will disappear for some time and then it'll reappear with an extensive list of Packages. (see the screenshot below)
- Just type Zen Coding inside the Command Palette. And select the Zen Coding Package (see the screenshot below). It should be noted that at this moment, Zen Coding has been renamed to Emmet, so instead of searching for Zen Coding, try searching for Emmet in the Command Palette.
- It will load for sometime and finally give you a message that says something like Zen Coding has successfully been installed (this message will appear at the bottom left side of Sublime)
- Now, to use Zen Coding, just Press Ctrl + Alt + Enter (for Windows)and Cmd + Option + Return (for Mac). A small window will appear at the bottom of the screen that says: Enter Koan:. Now just start typing inside this textbox and zen coding will be applied automatically to your code. As an example, refer to the screenshot below.
Type Package Install inside the Command Palette and Press Enter |
A list of Packages is displayed inside the Command Palette |
Type your Zen Code inside the Enter Koan area |
Till next time, bye
Thanks. Good article
ReplyDeletevery helpful , thank you
ReplyDeleteTHANK YOU SO MUCH!!!
ReplyDelete