Re: Check for parse errors right after edit
| From: | Curt Zirzow | Date: | Mon, 10 May 2004 20:04:20 +0000 |
| Subject: | Re: Check for parse errors right after edit | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185846@lists.php.net to get a copy of this message | ||
* Thus wrote David Yee (david@amsresponse.com):
> Hi- what's the best way to automatically check for parse errors after
> editing a php script with vi or vim? I suppose that "php -l name_of_script"
> can be ran after exiting, but I wouldn't want that command to be ran after
> running vim everytime. Or maybe there's a plugin for vim that will do this?
> Thanks for any input.
I usually define a map like:
map ;s :!php -l -d display_errors=1 %<CR>
Then if I type ';s' it takes the file loaded in vim and runs it
through php.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."