码迷,mamicode.com
首页 > 其他好文 > 详细

Sublime Text 2 安装配置插件

时间:2015-05-18 14:14:53      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

最近学习python,看网上推荐用sublime text2挺方便,就学习了一下对sublime text2 安装插件,先放在这里,以备以后查找

根据晚上资料修改,原文请看这里 

Python的自动补全插件推荐 JEDI, 写好之后可以直接按 Ctrl + B 解释执行.

1.安装Package Control (详细请点击)

# ctrl+`
# Sublime Text 2 import urllib2,os,hashlib; h = ‘eb2297e1a458f27d836c04bb0cbaf282‘ + ‘d0e7a3098092775ccb37ca9d6b2e4b7d‘; 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‘)

# Sublime Text3
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_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. Install Package

#Ctrl+Shift+P
=>Install Package
=>JEDI

3.直接在配置文件中进行修改,sublime 会自动安装

#Package setting => Package Contral => setting-user
{
    "in_process_packages":
    [
    ],
    "installed_packages":
    [
        "Alignment",
        "BracketHighlighter",
        "DocBlockr",
        "Emmet",
        "FileDiffs",
        "GBK Encoding Support",
        "Jedi - Python autocompletion",
        "jQuery",
        "JsFormat",
        "LESS",
        "Markdown Extended",
        "Package Control",
        "SublimeCodeIntel",
        "Trimmer"
    ]
}

 

Sublime Text 2 安装配置插件

标签:

原文地址:http://www.cnblogs.com/roger9567/p/4511586.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!