PHP Grammar automatic check of vim plugin, PHP syntax vim_php tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.