sublime 插件安装

来源:互联网 发布:阿姆斯特朗外星人知乎 编辑:程序博客网 时间:2024/06/16 11:17

sublime由于其强大丰富的插件功能深受开发者的喜爱,
但是从官网上下载的编辑器多数不带 package control ,因此不能自由随意的安装插件。
每次换新电脑都要重新安装,因此记录下安装过程方便查阅。

官方提供了两种安装方法:
https://packagecontrol.io/installation#st3

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+
”打开console,然后粘入下面的代码。

import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; 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)

再安装Package Control.sublime-package,放在“Installed Packages/ directory”目录下,重启sublime就可以了。
and then downloads the “Package Control.sublime-package” into it.and copy it into the Installed Packages/ directory

原创粉丝点击