Sublime的package control打不开问题(被墙)

1.Preferences中如果没有Package Control选项,通过 ctrl+` 或 View > Show Console打开控制台,粘贴如下代码到控制台点击回车:

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.cn/' + 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)

代码参考:https://www.jb51.net/softjc/712803.html

2.打开:Preferences > Package Settings > Package Control > Settings - User,修改成:

{
 "bootstrapped": true,
 "channels":
 [
  "https://erhan.in/channel_v3.json"
 ],
 "in_process_packages":
 [
 ],
 "installed_packages":
 [
  "ChineseLocalizations",
  "Package Control"
 ]
}

Sublime的package control打不开问题(被墙)_第1张图片

 

你可能感兴趣的:(Sublime,Text3)