sublime text3 配置 python

Win8环境下配置python开发IDE。

准备工具:

  1.  编辑器Sublime Text3 下载地址[http://www.sublimetext.com/3](http://www.sublimetext.com/3)
    
  2.  Python-2.7.10   下载地址 [https://www.python.org/downloads/](https://www.python.org/downloads/)
    
     参考文章链接:[http://www.cnblogs.com/waising/articles/3466120.html](http://www.cnblogs.com/waising/articles/3466120.html)
    

配置步骤:

     安装插件方法:

按下Ctrl+Shift+P调出命令面板

输入install 调出 Install Package 选项并回车,然后在列表中选中要安装的插件。如图:

     所有安装的插件位置:preferences>>package settings
  1.  首先安装**PackageControl,**用来安装插件。
    

a. 快捷键 ctrl+` 或者 View > Show Console 打开控制台

b. 粘贴一下代码到控制台

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())

c. 重启

d. 在Perferences->package settings中看到package control这一项,则安装成功

2. 安装插件-Pylinter:

保存自动规范:

{
// Configure pylint's behavior

"pylint_rc":"/Users/daniel/dev/pylintrc",

// Show different icons for errors,warnings, etc.

"use_icons": true,

// Automatically run Pylinter when saving aPython document

"run_on_save": true,

// Don't hide pylint messages when movingthe cursor

"message_stay": true

}

3. SublimeCodeIntel:

** 只能提示:**

{
   "python":"D:/Python27/python.exe",

    "pythonExtraPaths":

        [

            "D:/Python27",

             "D:/Python27/DLLs",

             "D:/Python27/Lib",

            "D:/Python27/Lib/lib-tk",

            "D:/Python27/Lib/site-packages"

        ]

    }

4. PEP8Autoformat :

自动格式化代码:

 {

"auto_complete": false,

"caret_style": "solid",

"ensure_newline_at_eof_on_save":true,

"find_selected_text": true,

"font_size": 11.0,

"highlight_modified_tabs": true,

"line_padding_bottom": 0,

"line_padding_top": 0,

"scroll_past_end": false,

"show_minimap": false,

"tab_size": 4,

"translate_tabs_to_spaces": true,

"trim_trailing_white_space_on_save": true,

"wide_caret": true,

"word_wrap": true,
}

你可能感兴趣的:(sublime text3 配置 python)