sublimetext3中pachage control的安装

来源:互联网 发布:淘宝网首页女装毛衣 编辑:程序博客网 时间:2024/05/24 07:03

关于 GO 语句集成环境的开发中。大伙可以模仿其他文章的。但 pachage control的安装因为 sublime 的版本不相同输入的内容不相同。

  1. 使用快捷键ctrl+`(反引号,tab键上面的那个)打开安装窗口

  2. sublime 3 的版本
    import urllib.request,os,hashlib; h = ‘2915d1851351e5ee549c20394736b442’ + ‘8bc59f460fa1548d1514676163dafc88’; 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)

  3. sublime2 版本的
    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’)

注意啦!安装的过程中,需要观察一下是否出错!
如果不太明白的;
http://studygolang.com/articles/4454
https://packagecontrol.io/installation#st2
这两个地址搞起!就可以拉!

0 0