更新时间:2016-12-13 16:02:08


版本支持:sublime text 2,sublime text 3

系统支持: Windows,OS X,Linux



插件介绍:PHP CodeSniffer, PHP Coding Standard Fixer, Linter and Mess Detector Support for Sublime Text

详细介绍: --




This plugin adds PHP CodeSniffer, PHP Code Beautifier and Fixer, PHP Coding Standards Fixer, the PHP Linter, PHP Mess Detector, Scheck support to Sublime Text.

For more information about this plugin such as features, installation requirements etc, please click here


You will need to configure this plugin to work for your setup, please view the options here


What do I do when I get “OSError: [Errno 8] Exec format error”?

  • This seems to be an issue you may get with regards to wrapper scripts.
  • Please make sure that the application/script you are referencing has the correct shebang line, as per GH-79

What do I do when I get “OSError: [Error 2] No such file or directory”?

  • Well, first of all you need to check that you have PHP_CodeSniffer, and if being used, the phpmd application.
  • If you have these applications installed, then it sounds like those applications are not in your PATH, or cannot be found in your PATH by the Python runtime, so configure “phpcs_php_path”, “phpcs_executable_path”, “phpmd_executable_path” and “php_cs_fixer_executable_path” with the actual paths to those applications

What do I do when I get “OSError: [Errno 13] Permission denied”?

  • It sounds like your path settings are incorrect.
  • You need to make sure that when you specifiy the path you include the entire path including the application
$ which phpcs
  • That entire output is the path you need in your configs.

What if I've installed the applications using Homebrew?

If you have installed php-cs-fixer, phpmd or phpcs via homebrew then please make sure that you define the “*_executable_path” option to the .phar application and not the wrapper script that is placed in your bin folder, as this will cause odd behaviour.

What other Key Bindings can I setup?

The following is a list of commands that you can bind to a keyboard shortcut:

  • phpcs_fix_this_file
  • phpcs_clear_sniffer_marks
  • phpcs_goto_next_error
  • phpcs_show_previous_errors
  • phpcs_sniff_this_file

In order to achieve this you need to add the following to one of your key bindings settings file:

{ "keys": ["ctrl+super+t"], "command": "phpcs_clear_sniffer_marks" }

To decide which “Fixer” to use, you can do:

{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "CodeBeautifier"}},


{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "Fixer"}},

You can then change the ctrl+super+t combination to something of your choosing.

language syntax snippets color scheme linting theme auto-complete text manipulation formatting javascript build system utilities completions syntax file navigation php python html go markdown search testing code navigation documentation git ruby language text navigation autocomplete vcs utils lua coffeescript latex sass build highlighting text selection java diff scala terminal addon preview todo scss js Completion automation snippet comments nsis svn file creation formatter project sidebar commands console test less repl indent code sharing C hg monokai clipboard file open perl tasks nodejs sync android C++ react japanese editor json markup code style Jasmine editor emulation es6 font diff/merge material jsx syntax highlight docs translate textile code generation debugging sql google node minification laravel typescript cursors manipulation golang save workspace haskell emacs file logs command line wordpress templating compare matlab precompiler watch xml window hexadecimal difference st3 ember jade stylus notes backup indentation browser share rust julia ide make debug angular groovy 中文 unit test converter vhdl utility plugin development unicode restructuredtext apicloud coding Clang spec ftp icons lisp text format grails remote collaboration merge R rubymotion framework file comparison codex sublime svg dark email CSS commit open files stata ruby on rails logger pattern writing convert cli fullscreen validate copy calculator coffee hint icon_fonts code Debugger preferences automate colour input method intellisense converting tidy bash package oracle conflicts pandoc