zoukankan      html  css  js  c++  java
  • Sublime Text 3 插件的安装、升级和卸载,以及安装package control 出现问题解决过程记录

    sublime text3 可以使用 Package Control 安装其他插件,来提高开发效率。所以我们先要知道Package Control是怎么安装的。

    1、安装Package Control

    Package Control官网安装:https://packagecontrol.io/installation

    Simple:

    The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

    首先通过快捷键 ctrl+` (mac电脑esc下面的按键) 或者 View > Show Console 打开控制台(注:如果安装有QQ输入法等快捷键有冲突的情况时候,可以先修改相关软件功能快捷键的设置),输入以下代码,enter即可.

    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)

    2、自动安装package control 失败

    报错展示:

    File "./python3.3/urllib/request.py", line 1248, in do_open

    ........

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "./python3.3/urllib/request.py", line 156, in urlopen

    .........

    解决方式:显然自动安装已经不行,按照官网进行手动安装即可。

    If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:

    1. Click the Preferences > Browse Packages… menu
    2. Browse up a folder and then into the Installed Packages/folder
    3. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
    4. Restart Sublime Text

    3、不能进行package control:install package,以及后续插件安装

    报错展示:

    Package Control: Unable to download https://packagecontrol.io/channel_v3.jsonafter 3 attempts

    Emmet: No need to update PyV8
    Package Control: Skipping automatic upgrade, last run at 2019-02-26 18:03:18, next run at 2019-02-26 19:03:18 or after
    Package Control: Unable to download https://packagecontrol.io/channel_v3.jsonafter 3 attempts
    Unable to open /Users/yoowei/Library/Application Support/Sublime Text 3/Packages/Package Control/Package Control.sublime-settings
    Detected ASCII vs Undefined with 100% confidence
     

    * 下载Package Control手动安装(详见第一个问题)
    * 科、学、上、网下载channel_v3.json,记事本打开,找到"schema_version": "3.0.0".把3.0.0改成2.0,保存
    * 把channel_v3.json放到一个安全不会被删除的目录下。
    * subline菜单栏中的prefrences->package setting->Package control->setting-user。在{}中加入
    "channels":
    [
    "channel_v3的存放目录完整路径"
    ],
    * 保存后,ctrl+shift+p,正常安装就成了。
    之前安装失败原因:channel_v3.json被墙了,无法下载下来。

    完美解决!
    4、Sublime Text 3 插件的安装、升级和卸载
    1) 快捷键:command+shift+p 打开命令面板
    2)插件安装: 输入:install ,选择“Install package” ,然后在新弹出的窗口中查询要安装的插件,点击需要安装的插件,即可;
    3)升级插件: 输入:upgrade,选择“upgrade packages”,如果有列表出来则有插件需要更新,然后点击需要升级的插件即可;
    4)删除插件: 输入:remove,选择“remove package”,然后弹出的列表就是可进行卸载的插件,想卸载哪个点击即可;
  • 相关阅读:
    死磕Lambda表达式(四):常用的函数式接口
    死磕Lambda表达式(三):更简洁的Lambda
    死磕Lambda表达式(二):Lambda的使用
    死磕Lambda表达式(一):初识Lambda
    二叉树面试题:前中序求后序、中后序求前序
    五分钟后,你将真正理解MySQL事务隔离级别!
    详细解析Redis中的布隆过滤器及其应用
    详细解析Java虚拟机的栈帧结构
    面试真题:求100万内的质数
    C#-Xamarin的Android项目开发(一)——创建项目
  • 原文地址:https://www.cnblogs.com/richard-youth/p/10443181.html
Copyright © 2011-2022 走看看