安装Package Control插件

自动安装:

1.按键 ctrl+`,打开sublime命令输入框,粘贴下里面的代码,按回车执行。

  • 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.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 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.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')
  • 如果安装过程中报错,则进行手动安装

手动安装:

1.下载文件 Package Control.sublime-package

官网:https://packagecontrol.io/installation#st3
github:https://github.com/wbond/package_control
建议去github下载。

  • 下载package control包
    sublime text3相关配置
  • 打开插件存放位置。
    sublime text3相关配置
  • 将下载的.zip包存放至“Sublime Text 3\Installed Packages\”
    sublime text3相关配置
  • 重启sublime即可

Install package解决报错:There are no packages available for installation

  • 报错如下:
    sublime text3相关配置
  • sublime下载插件会http请求云端的channel_v3.json文件,发生报错一般因请求超时。则进行手动配置channel_v3.json文件。
  • 点击Preferences->Package Setting->Package Control ->Setting Default,可以看到该文件是放置在网络中进行读取的。
    sublime text3相关配置
  • 下载文件channel_v3.json:

下载地址:点击下载

  • 解压后得到channel_v3.json,放到一个任意位置:
    sublime text3相关配置
  • 在Preferences->Package Setting->Package Control ->Setting User 中配置该路径:
    sublime text3相关配置

安装Terminal

  • 打开 Preferences>Package Control,选择Install Package
  • 搜索并安装Terminal
  • 打开 Preferences > Package setting > Terminal > Setting -User,配置一下代码:
    sublime text3相关配置
{
    "terminal": "C:\\windows\\system32\\cmd.exe",
    "parameters": ["/START","%CWD%"]
}

相关文章: