sponsor Vim development Vim logo Vim Book Ad

php_console.vim : Use php console application for debug messages (for windows)

 script karma  Rating 22/9, Downloaded by 1441    Comments, bugs, improvements  Vim wiki

created by
Klaus Horsten
script type
This is for windows.

For unix see http://vim.sourceforge.net/scripts/script.php?script_id=326.
(But you can adapt this also for unix. Just the path-reference to the php.exe is different.)

Go into your php-file and :call ParsePhpFile().

Write a mapping to automat this. E.g.
map <F5> :call ParsePhpFile()<cr>
imap <F5> <esc>:call ParsePhpFile()<cr>

Now you can debug your php-file without leaving vim.

You can jump to the error lines by clicking on the compiler output in the window that opens below.

After finishing removing the errors you can open your php-file in the browser.

* You do not rely on apache. This means:
* You can open the php-files everywhere in the filesystem (also outside of htdocs).
* There is no difference between the console and the browser output. (When there is no error output you see the normal html output.)
* Roundtrip error checking is possible without leaving vim.
install details
Put it in the ftplugin directory.
To do this you can create a "php" directory there and drop it into it.
But vim should also recognize it in this form "php_XXXXXX.vim".
Go into the environment variables of windows and set a path to the php.exe.
If you do not see a complete compiler output check the errorformat.

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
php_console.vim 0.1 2003-10-12 6.0 Klaus Horsten Renamed file to make it get sourced from the ftplugin directory.
PhpConsole.vim 0.1 2003-10-02 6.0 Klaus Horsten Initial upload
ip used for rating:

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.
SourceForge.net Logo