Closed DerpDarako closed 8 years ago
The plugin probably doesn't recognize that php is installed. Is php in your path? Which OS do you use? Windows?
What's the result of
:echo executable("php")
:echo checksyntax#MaybeUseCygpath(g:checksyntax#defs#php#cmd)
Regards
Hello,
Thank you for your quick replay. The machine is Linux.
I did your commands:
:echo executable("php") 1 echo checksyntax#MaybeUseCygpath(g:checksyntax#defs#php#cmd) Nothing appears
echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
type php php est /usr/bin/php
If I understand I have to set up something?
In the past, users had difficulties with php because of certain flags that influence how php reports errors. You might read :help g:checksyntax#defs#php#args and the php-related issues:
https://github.com/tomtom/checksyntax_vim/issues/7
By default, checksyntax uses
php -l -n -d display_errors=1 -d error_log= -d error_reporting=E_ALL
You might want to check whether this command reports errors on stdout on your machine.
I think syntastic uses
-d error_reporting=E_ALL -l -d display_errors=1 -d log_errors=0 -d
xdebug.cli_color=0
It could be this yields better results.
I'm not sure it's the source of my issue :
checksyntax#defs#php#args looks ok because it works fine when I use your default single key F5.
When I press F5 i got the error window but it doesn't appear when I use :w
checksyntax#defs#php#args looks ok because it works fine when I use your default single key . Sorry, I got you wrong. I thought it doesn't work either way.
When I press i got the error window but it doesn't appear when I use |:w|
auto checks are now disabled by default. You have to set g:checksyntax#auto_enable_rx so that it matches the filetypes you want to check automatically. E.g. you could use "." to automatically check any files or "^php$" to check only php files.
HTH
Yeah, thank you... I'm so sorry you said it in your doc :
See also |g:checksyntax|, |g:checksyntax#auto_enable_rx
It works fine.
you said it in your doc :
I will put more emphasis on that part.
Hello,
I tried your plugin for php file but if I want to check the syntax I have to press F5 because if I save my file with
:w
nothing happens...In your doc:
So I think I don't need to set up checksyntax_auto in my vimrc... I tried with the option in my vimrc:
Whatever, nothing happens when I press
:w
It's weird, isn't it?