【问题标题】:ST3 SublimeLinter will not work for PHP on windowsST3 SublimeLinter 不适用于 Windows 上的 PHP
【发布时间】:2014-08-06 11:22:34
【问题描述】:

我很难让我的 sublimlinter 为 PHP 工作。这是我的设置,如果您有经验的可以快速查看一下,让我知道它有什么问题。谢谢!

Windows 系统路径变量:

C:\wamp\bin\php\php5.4.12;

SublimeLint 默认设置:

{
    "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,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": ["C:\\wamp\\bin\\php\\php5.4.12"]
        },
        "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",
            "html 5": "html",
            "html (django)": "html",
            "html (rails)": "html",
            "php": "html"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

【问题讨论】:

  • 您是否安装了 SublimeLinter-php 软件包之一?

标签: php sublimetext sublimelinter


【解决方案1】:

SublimeLinter 是一个 linting 框架,需要单独安装各个特定语言的 linter - 查看 SublimeLinter-php* linters 的 Package Control,然后选择一个或多个吸引您眼球的。请通读the documentation 以获取完整信息。那里有很多,但我强烈建议您阅读所有内容,因为它会在以后为您省去很多麻烦。基本上,您需要 SublimeLinter 包本身,这是您已经拥有的,一个特定于语言的 linter,如 SublimeLinter-phplint,以及 linting 二进制文件(在本例中为 phplint)。 SublimeLinter-php 仅使用 php -l 进行 linting,因此不需要单独的二进制文件,但根据您的需要和个人喜好,您可能希望使用其他二进制文件(phpcsphpmd)。

【讨论】:

    猜你喜欢
    • 2013-12-25
    • 2014-04-11
    • 2015-04-14
    • 2013-05-02
    • 2015-10-22
    • 2016-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多