zoukankan      html  css  js  c++  java
  • sublime text 3和sublime text 2的 package control 插件 代码

    SECURITY NOTICE: The Python code used by this method does not use SSL because Sublime Text on Linux does not have the ssl module. Additionally, for Windows and OS X it is not possible for a simple snippet of code like this to validate the SSL certificate for sublime.wbond.net

    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.

    Sublime text 3

    import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

    Sublime text 2

    import urllib2,os; 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( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

    This code creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it.

    Note:

    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
  • 相关阅读:
    ExtJs gridPanel Column 时间格式化
    Asp.Net MVC结合ExtJs gridPanel 分页和高度自适应
    iOS组件化思路-大神博客研读和思考
    怎么面试架构师
    iOS应用架构谈 本地持久化方案及动态部署
    iOS应用架构谈 网络层设计方案
    iOS应用架构谈 view层的组织和调用方案
    iOS应用架构谈 开篇
    隐藏TabBar是个累人的活
    App升级时数据库的迁移更新
  • 原文地址:https://www.cnblogs.com/happig/p/3294880.html
Copyright © 2011-2022 走看看