tomtom / checksyntax_vim

Check a file's syntax when saving a file (php, ruby, tex ...) with vim
http://www.vim.org/scripts/script.php?script_id=1431
GNU General Public License v3.0
94 stars 9 forks source link

Check if command exists, before executing it / do no pollute quickfix list stack #2

Closed blueyed closed 13 years ago

blueyed commented 13 years ago

When saving a .php file where PHP is not installed, the current quickfix list gets replaced, only with the error from the shell that php was not found.

There should either be "cmd_prog" param or the first word from "cmd" could get used with executable() to check for this. In case the exe is missing there should be a normal message for autochecks and an error message for manual checks.

In case there are no errors, it should also create no new quickfix list.

tomtom commented 13 years ago

IMHO the problem is setting the auto property to 1 when it should be 0. I now check for executables when loading the autoload file.