sublime 中设置pylint

http://www.360doc.com/content/14/1110/11/15077656_424004081.shtml

安装 pylinter 插件

    详见 sublime 插件安装

  配置

{
    // When versbose is 'true', various messages will be written to the console.
    // values: true or false
    "verbose": true,
    // The full path to the Python executable you want to
    // run Pylint with or simply use 'python'.
    "python_bin": "python",
    // The following paths will be added Pylint's Python path
    "python_path": [

                   ],
    // Optionally set the working directory
    "working_dir": null,
    // Full path to the lint.py module in the pylint package
    "pylint_path": "D:/Python27/Lib/pylint-1.6.4/pylint/lint.py",
    // Optional full path to a Pylint configuration file
    "pylint_rc": null,
    // Set to true to automtically run Pylint on save
    "run_on_save": true,
    // Set to true to use graphical error icons
    "use_icons": true,
    "disable_outline": false,
    // Status messages stay as long as cursor is on an error line
    "message_stay": true,
    // Ignore Pylint error types. Possible values:
    // "R" : Refactor for a "good practice" metric violation
    // "C" : Convention for coding standard violation
    // "W" : Warning for stylistic problems, or minor programming issues
    // "E" : Error for important programming issues (i.e. most probably bug)
    // "F" : Fatal for errors which prevented further processing
    "ignore": [],
    // a list of strings of individual errors to disable, ex: ["C0301"]
    "disable": [],
    "plugins": []
}

安装 sublimeLinter 插件

  配置

{
    "default": {
        "debug": false,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "python django": "python",
            "pythonimproved": "python",
            "magicpython": "python",
            "html 5": "html",
            "html (django)": "html",
            "html (rails)": "html",
            "javascript (babel)": "javascript",
            "php": "html"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

 

使用:

  利用sublime 打开python,ctrl+s 保存时,在源码区显示pylint内容

  

  修改后,再次保存,即可完成

      前提是已经安装好python及pylint。如果pylint无法使用,需要安装其他的module,可以通过pip进行安装。

消去显示区域中的outline

  设置pylinter 插件的配置, disable_outline 为 true,即能够去掉。

 "disable_outline": true,

  

sublimeCodeIntel 插件

  Sublime Text 3安装sublimeCodeIntel插件和使用

  按住alt+鼠标左键点击自己定义的任意函数,即可实现跳转。

  http://blog.sina.com.cn/s/blog_61bd52310102w3if.html

原文地址:https://www.cnblogs.com/doscho/p/6340399.html