mac sublime2-3 text 安装 emmet Html 开发神器 react

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

<pre name="code" class="javascript">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 rel="stylesheet" href="style.css">

link

a{name}  ->  <a href="">abc</a>

head.logo -> <head class="log"></head>

ul>li*5   ->

 <ul>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
 </ul>


> 可以使用多次

 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/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值