1.首先你的有个妹子Sublime 2/3.
2.安装Package control
2.1打开Sublime 内置命令行.(View-Open Console 或者control+`) `就是1键盘旁边的键
22复制下面代码到命令行到底部命令行。
import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
3.打开Sublime
3.1打开Sublime 内置命令行.(View-Open Console 或者control+`) `就是1键盘旁边的键
3.2复制下面代码到命令行到底部命令行。
sublime 2
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'
sublime 3
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; 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://sublime.wbond.net/' + 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)
4. PC 下 Ctrl+Shift+P, Mac 下 Cmd+Shift+P(Tools – Command Paletter),输入 install 选中Package Control: Install Package 并回车,然后输入 Emmet.
在sublime 底部会出现安装的提示,完成后会显示。
Package Control Message 的文本
5.如何使用emmet
5.1 新建index.html 文件。
5.2 键入html:5 然后按 TAB,爽爆的感觉,自动出来
5.3常用指令
html:5 ==!
link:css +TAB ->
link
a{name} -> abc
head.logo ->
ul>li*5 ->
> 可以使用多次
!
p>Lorem10 or p>Lorem50
6. sublime react autocomplete
cmd+shift+p
React Templates
ref:
https://packagecontrol.io/installation
https://hoolite.be/2014/07/04/install-use-emmet-zen-coding-plugin-sublime-text-2/
http://docs.emmet.io/