I would like to know how if it's possible to validate if a PHP file is valid in VIM without closing VIM every time?
Thank you
|
You can execute shell commands in vim. This is the same as calling
I have this mapped into my
|
|||||||||||||||||
|
Use
Your syntax errors will be in the Quickfix window. You can open this buffer with You can use To simplify the workflow I suggest a mapping like this one:
Now you can just hit To make this a bit more robust, add these commands to
For more information:
|
|||||||||
|
Try http://www.vim.org/scripts/script.php?script_id=2736 it's very good. |
|||||||||||||
|
To check PHP syntax without having to save first you can use: map :w !php -l |
|||
|
|
|||
|