Home >Web Front-end >HTML Tutorial >Install Subline Text 3 and its plug-in_html/css_WEB-ITnose on windows7
Please choose the appropriate installation version according to your platform
Installation completed Finally, set the TAB key to 4 spaces (Preferences??>Settings-User):
{ "tab_size": 4, "translate_tabs_to_spaces": true, "font_size": 11, "ignored_packages": [ "Vintage" ]}
Click the view??>show console menu on the menu bar, then paste the Python code into your text console,
press enter key and wait a few minutes.
Python code:
import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
The above installation method is relatively simple, there is also a manual installation method, please check the official website: https://packagecontrol.io/installation #st3
Usage example
Example 1: Enter html:5, and then press tab key, you will get the following code:
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>
Example 2: Enter div#test, and then press the tab key, you will get the following code:
<div id="test"></div>
Example 3: Enter div.test*5, and then press the tab key, you will get the following code:
<div class="test"></div><div class="test"></div><div class="test"></div><div class="test"></div><div class="test"></div>
Example 4: Enter div>h2 ul>li*5, and then press the tab key, you will get the following code:
<div> <h2></h2> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> </ul></div>
More detailed usage introduction:
After talking about so many benefits, let’s introduce how to install it?
Press the ctrl shift p key combination, or click Preferences??>Package Control
As shown below;
Enter install package
Confirm
Enter emmet
After the installation is successful, the following prompt will appear. Restart the editor and continue to complete the installation. .
Take installing the SASS plug-in as an example. Follow the steps to install the emmet plug-in. Similarly, we can first Install SASS, and then install SASS Build, as shown in the figure:
Similar to LESS installation, install LESS first, then install LESS BUILD.
The plug-in installation is the same as above. You will encounter a problem here. When executing Pretty Code, the following box will pop up. :
Prompt, the installation path of nodejs cannot be found (nodejs needs to be installed), click ok and modify it, as shown in the figure:
----- BEGIN LICENSE -----Andrew WeberSingle User LicenseEA7E-855605813A03DD 5E4AD9E6 6C0EEB94 BC99798F942194A6 02396E98 E62C9979 4BB979FE91424C9D A45400BF F6747D88 2FB8807890F5CC94 1CDC92DC 8457107A F151657B1D22E383 A997F016 42397640 33F41CFCE1D0AE85 A0BBD039 0E9C8D55 E1B89D5D5CDB7036 E56DE1C0 EFCC0840 650CD3A6B98FC99C 8FAC73EE D2B95564 DF450523------ END LICENSE ------
Note : When installing the plug-in, sometimes It will be very slow, and even prompts: thare are no packages available for installation
Solution: You need to add: IPv4 address sublime.wbond.net to the HOSTS text of the computer, such as: 192.168.1.51 sublime.wbond.net
For details, please see: http://stackoverflow.com/questions/25105139/sublime-text-2-there-are-no-packages-available-for-installation