如何给sublime text.安装插件

1、Sublime的Package Control安装方法

Package Control插件本身是一个为了方便管理插件的插件

第一步:ctrl+~,在弹出的下部边框中输入:

如果是 Sublime text 3

import urllib.request,os,hashlib;
h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60';
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)

 

如果是Sublime text 2

import urllib2,os,hashlib; 
h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 
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')

 

如果命令行安装失败,可以使用手动安装的方法

官方地址:https://packagecontrol.io/installation

2:

在里面输入install package

等他自动弹出一个输入框时 在里面输入Emmett

输入完后  他所显示的效果插件 可以为

 

 

 

猜你喜欢

转载自www.cnblogs.com/ruth-liu/p/9175466.html