Ⅰ. 插件描述
Use php console application for debug messages (for windows)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/php-console-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/php-console-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/php-console-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/php_console.vim
Ⅳ. 文档说明
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.
Advantages:
- 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.