sponsor Vim development Vim logo Vim Book Ad

phpErrorMarker : Mark syntax errors in php file

 script karma  Rating 18/8, Downloaded by 3179  Comments, bugs, improvements  Vim wiki

created by
Frederic Hardy
 
script type
ftplugin
 
description
phpErrorMarker set makeprg et errroformat automaticaly for php file.
A call to :make launch php syntax checking and set sign (:h sign for more informations) if there are any errors in file.
Some variables may be interesting :
g:phpErrorMarker#autowrite : if true, file will be automaticaly write before syntax checking, default is "0".
g:phpErrorMarker#php : path to php binary, default is "php".
g:phpErrorMarker#textError : sign used for error, default is "><".
g:phpErrorMarker#textWarning : sign used for warning, default is "--".
g:phpErrorMarker#automake : if true, make is automaticaly done after a write command like ":w", default is "0".
g:phpErrorMarker#openQuickfix : if true, quickfix window will be automaticaly opened after ":make".
g:phpErrorMarker#filter: if not empty, define the filter utility to clean PHP output.
Set these variables in your .vimrc to override default values, like that :

let g:phpErrorMarker#autowrite = 1

Please, report any bug to phpErrorMarker.vim[..at..]mageekbox.net.
 
install details
Download vimball, open it with vim, and do :so %.
Create or open a php file, and do :make.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
phpErrorMarker.vmb 0.0.7 2016-07-28 7.0 Frederic Hardy Add filtering support to clean `php -l ` output.
For example, do `let g:phpErrorMarker#filter="grep -v '^^M$'" to remove lines which contains only "\r".
Add phpErrorMarker#configure() to reconfigure phpErrorMarker if one of its global variables was updated.
phpErrorMarker.vmb 0.0.6 2012-12-21 7.0 Frederic Hardy Improve errorformat to match more precisely PHP parse error message.
phpErrorMarker.vmb 0.0.5 2012-12-18 6.0 Frederic Hardy Autocommand about quickfix window are now called only when :make is used.
phpErrorMarker.vba 0.0.4 2009-10-06 6.0 Frederic Hardy Add a call to <C-L> after autowrite to remove a screen bug in vim.
phpErrorMarker.vba 0.0.3 2009-09-28 6.0 Frederic Hardy Remove bugs.
phpErrorMarker.vba 0.0.2 2009-09-25 6.0 Frederic Hardy Add GLVS.
Add g:phpErrorMarker#openQuickfix variable, default is "1".
phpErrorMarker.vba 0.0.1 2009-09-25 6.0 Frederic Hardy Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github