按着网上的方法不行的可能是无法访问相关网站,请直接参考手动安装方法
安装Package Control
可以访问相关网站:
通过控制台安装插件代码,通过 ctrl+` 或 View > Show Console打开控制台,将下方对应版本的Python代码粘贴到控制台,回车。
sublime text3
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)
sublime text2
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.cn/' + 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')
手动安装方法
- Click the Preferences > Browse Packages… menu
- Browse up a folder and then into the Installed Packages/ folder
- Download Package Control.sublime-package and copy it into the Installed Packages/ directory
- Restart Sublime Text
博主下载好的Control.sublime-package放在下方。
https://pan.baidu.com/s/1zwGjY_qIKwS8srkc4it2Dw 提取码: 5xqf
安装Install package
可以访问相关网站:
Ctrl+Shift+P快捷键搜索install package回车即可
手动安装法
依次打开Preferences->Package Settings ->Package Control ->Settings
会弹出来两个默认的Settings无法修改,我们在Settings-User中添加或修改如下代码保存重启软件
{
"bootstrapped": true,
"channels":
[
"/home/zy/.config/sublime-text-3/channel_v3.json" //此处填写你的channel_v3.json文件的目录,channel_v3.json下载方式已经放在下方
],
"in_process_packages":
[
],
"installed_packages":
[
"Package Control"
]
}
https://pan.baidu.com/s/13mrk7evi1n0thjJhKl_nkw 提取码: 3kay
Ctrl+Shift+P搜索install package就可以下载我们想要的插件。
这篇博客提供了无法通过网络安装Sublime Text插件时的手动安装步骤。对于PackageControl,用户需要下载.sublime-package文件并放到指定目录。对于InstallPackage,需修改Settings-User文件添加channel_v3.json路径。同时提供了手动下载链接。
&spm=1001.2101.3001.5002&articleId=113457486&d=1&t=3&u=6de3889b236b44eca61a6550e04fe592)
466

被折叠的 条评论
为什么被折叠?



