The Vim plug-in that automatically checks PHP syntax, and the php syntax vim. The Vim plug-in that automatically checks PHP syntax. The php syntax vim is hard to avoid syntax errors such as a semicolon due to a large number of PHP statements recently written, the general check method is to return to the Vim plug-in that runs PHP syntax to automatically check the command line, and the php syntax vim
Due to the large number of PHP statements recently, it is inevitable that you may accidentally write less semicolons or other syntax errors. the general check method is to return to the command line to run php-l, or you can upgrade it and run it directly in Vim :! Php-l %, or bind this as a shortcut key, for example, map :! Php-l % You can immediately perform a syntax check whenever you press F5. However, I still feel a little uncomfortable, because many Ides perform real-time checks, and syntax errors are prompted next to the code line. Although real-time check is not necessary, automatic check is much more convenient than manual check. for example, automatic check is performed when the php file is saved.
So I wrote this phpcheck. vim plug-in. the basic function is to check the syntax when saving the php file. if there is a mistake, a prompt is displayed. if there is no error, no prompt is displayed. This plug-in may not be visible most of the time, but the prompt is displayed when a syntax error occurs occasionally by mistake.
The error message is shown in:
The error message contains the error message and the error row number.
Http://www.vim.org/scripts/script.php? Script_id = 1, 4984
Put the downloaded phpcheck. vim in your
~ /. Vim/plugin/
Or plug-in/in the Vim installation path /.
In most cases, configuration is not required. If your phpbin directory is not in the system environment variable, you can specify the phpbin path as follows:
Let g: PHP_SYNTAX_CHECK_BIN = '/apps/php/bin/php'
How can I use vim to edit the php language quickly (Auto Indent )? How to set it? ,,,
This should be because php syntax files are missing, not configuration issues. check whether php syntax files exist in the syntax folder.
Why does the VIM Syntax Highlight disappear after saving the file?
If you can, send your vimrc [, gvimrc] file, and the list of plug-ins you are using. the setting conflict should not be caused by any exceptions.
Because PHP has been frequently written recently, it is inevitable that you may accidentally write less semicolons or other syntax errors. the general check method is to return to the Command Line for running...