Vimphp syntax check

Source: Internet
Author: User
I have always been a loyal fan of editplus and have little experience in using editplus. after switching to vim, it took a lot of effort to convert some habits and gradually broke away from editplus. It can be seen that a handy editor is still highly viscous. previously, editplus can be integrated with ZendCodeAnalyzer that comes with zendstudio.

I have always been a loyal fan of editplus and have little experience in using editplus. after switching to vim, it took a lot of effort to convert some habits and gradually broke away from editplus. It can be seen that a handy editor is still highly viscous. the editplus mentioned earlier can be integrated with ZendCodeAnalyzer that comes with zend studio.

I have always been a loyal fan of editplus and have little experience in using editplus. after switching to vim, it took a lot of effort to convert some habits and gradually broke away from editplus. It can be seen that a handy editor is still highly viscous. the editplus mentioned previously can be integrated with ZendCodeAnalyzer that comes with zend studio to detect php syntax, which is quite convenient. so how can we use vim to implement similar functions? After some searches, I found the answer:

Map

  
   
:! Php-l %

   

  

In this way, you can directly use ctrl + j in vim to call the php parser to check the syntax of the current document. of course, if the php parser is not in your path, you should write it to the full path, as shown below:

Map

  
   
:! C:/php-l %

   

  

PS: the syntax beautification function of vim is also very convenient, as long as you enter=: 1, $You can arrange the current code in an orderly manner, while editplus requires the cooperation of other tools to achieve this.

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.