PHP Grammar automatic check of vim plugin, PHP syntax vim
Due to the recent write PHP more, occasionally hand-less write a semicolon and other grammatical errors, the general way is to go back to the command line run Php-l, or upgrade directly in Vim run:!php-l%, or then bind this as a shortcut key, such as: Map :!php-l% , you can perform a grammar check immediately whenever you press F5. But still feel slightly uncomfortable, because many Ides are checked in real time, syntax errors will prompt the line of code next. While real-time checking may not be necessary, automatic checking is much easier than manual checking, such as checking automatically when a PHP file is saved.
So wrote this Phpcheck.vim plug-in, the basic function is in the PHP file save grammar Check, there are errors will prompt out, no error will not have any hint. Most of the time, you will not see the effect of this plugin, but occasionally hand errors in grammar, you will see the prompt.
The error message is as follows:
The error message contains error messages and error line numbers.
Plugin download
http://www.vim.org/scripts/script.php?script_id=4984
Plug-in Installation
Put the downloaded Phpcheck.vim in your
~/.vim/plugin/
Or plugin/in the Vim installation path.
Plug-in configuration
Most of the cases are not configured. If your Phpbin directory is not in the system environment variable, you can specify the path of Phpbin, as follows:
Let G:php_syntax_check_bin = '/apps/php/bin/php '
How to use Vim to edit the PHP language faster (auto indent)? How to set? 、、、
This should be less PHP syntax file, not the configuration of the problem check under the syntax folder for PHP syntax files
What is vim syntax highlighting disappearing after saving a file?
If you can send your VIMRC[,GVIMRC] file, and the list of plugins you use, it should be a setup conflict.
http://www.bkjia.com/PHPjc/861787.html www.bkjia.com true http://www.bkjia.com/PHPjc/861787.html techarticle PHP Grammar automatically check the VIM plugin, PHP syntax vim due to the recent write PHP more, occasionally hand-less write a semicolon and other grammatical errors inevitably, the general check is to go back to the command line run ...