zoukankan      html  css  js  c++  java
  • [SublimeText] 安装包管理

    由于各种访问原因,因此记录一下给自己使用,原文地址如下:

    http://www.bonusbits.com/wiki/HowTo:Setup_Package_Control_for_Sublime_Text

    Method 1 (Sublime Text Script)

    This will not work if you are behind a proxy. If you're behind a proxy use Method 2.

    1. Open Sublime console
      CTRL+`
    2. Sublime Text 2
      import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path()os.makedirs(ipp if not os.path.exists(ippelse Noneurllib2.install_openerurllib2.build_openerurllib2.ProxyHandler()))openos.path.join( ipp, pf)'wb' ).writeurllib2.urlopen'http://sublime.wbond.net/' +pf.replace' ','%20' )).read())print'Please restart Sublime Text to finish installation')
    3. Sublime Text 3
      import urllib.request,os,hashlib; h 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d';pf 'Package Control.sublime-package'; ipp = sublime.installed_packages_path()urllib.request.install_opener(urllib.request.build_openerurllib.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 elseopen(os.path.join( ipp, pf)'wb' ).write(by)
    4. Restart Sublime

    Method 2 (Manually)

    If you are behind a proxy use this method. After installing then set your proxy settings

    1. Download plugin file
      http://sublime.wbond.net/Package%20Control.sublime-package
    2. Copy Package Control.sublime-package to the Install Packages folder under Sublime Text install folder.
      1. Windows
        C:UsersusernameAppDataRoamingSublime Text 2Installed Packages
      2. Mac
        sudo cp ~/Downloads/Package Control.sublime-package ~/Library/Application Support/Sublime Text3/Installed Packages/
    3. Restart Sublime

    相关文章:

    http://blog.jobbole.com/82527/

  • 相关阅读:
    设置VS2017背景图片
    NuGet的简单使用
    C#6.0,C#7.0新特性
    openFileDialog的Filter属性设置
    C# 获取当前路径7种方法
    正则表达式总结
    IDEA设置switch/case代码块自动补齐
    CentOS7使用yum安装RabbitMQ
    vue react 路由history模式刷新404问题解决方案
    @Component, @Repository, @Service的区别
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/5094254.html
Copyright © 2011-2022 走看看