php-manual.vim


Ⅰ. 插件描述

php manual doc

Ⅱ. 基本信息

创建日期:  2012-12-25
使用用户:  1
Github星:  1
插件作者:  river

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'drwx/php-manual-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'drwx/php-manual-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'drwx/php-manual-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/drwx/php-manual.vim

Ⅳ. 文档说明

php-manual

This is php manual for vim with help keyword doc. You can press SHIFT-K to view the Explanation of the function under the cursor.

Install: 
a. Copy these files to runtimepath.(~/.vim,..) 
b. Use vundle, but do not run helptags command. 
c. other package manager. 

Note: 
if you want to generate docs by youself, follow next steps(just example): 

1. 
cd YOUR-PHP-SOURCE-CODE 
./configure --prefix=/Users/river/codeX/phpmanual/php551 --with-pear --with-zlib=/usr/local/Cellar/zlib/1.2.8 
make 
make install 
 
2.  
php551/bin/pear install doc.php.net/phd_php  
php551/bin/pear install XML_Parser  
 
3.  
svn co https://svn.php.net/repository/phpdoc/modules/doc-en phpdoc  
cd phpdoc  
vim build.sh  
PHP=/Users/river/codeX/phpmanual/php551/bin/php  
PHD=/Users/river/codeX/phpmanual/pear/bin/phd  

if error because memory exhausted, hack the code: 
vim /Volumes/DataHD/code/phpmanual/pear/share/pear/phpdotnet/phd/Index.php
add code: ini_set('memory_limit', '256M');

4. 
wget http://blog.planetxml.de/uploads/source/php/phpdoc/parser2.php.txt -O parser2.php 

vim parser2.diff 
==========code start========== 
 
--- a/parser2.php 2011-05-27 00:07:45.515535000 +0800
+++ b/parser2.php 2011-05-26 16:37:01.081761000 +0800
@@ -344,14 +344,16 @@
 //fwrite($fp, "!_TAG_FILE_SORTED       1\n");
 fclose($fp);
 
-load_entities('phpdoc/entities/global.ent');
+load_entities('phpdoc/doc-base/entities/global.ent');
+load_entities('phpdoc/doc-base/entities/version.ent');
+load_entities('phpdoc/doc-base/entities/file-entities.ent');
 load_entities('phpdoc/en/language-defs.ent');
 load_entities('phpdoc/en/language-snippets.ent');
-load_entities('phpdoc/en/livedocs.ent');
+load_entities('phpdoc/en/extensions.ent');
 load_entities('phpdoc/en/contributors.ent');
 //print_r($entities['&example.outputs;']);
 //print_r($entities);
-process_all('phpdoc\en\reference');
+process_all('phpdoc/en/reference');
 //process_all('d:/htdocs/livedocs/phpdoc/en/reference');
 
 echo "sorting tags\n";

==========code end========== 
delete line: 
load_entities('phpdoc/doc-base/entities/version.ent'); 

5. 
patch -p1 < parser2.diff 

6. 
mkdir out 
php551/bin/php parser2.php 

7. 
done, copy out/* to doc/ 

8. 
ref: 
http://blog.planetxml.de/archives/16-PHP-Manual-in-VIM-einbinden.html
http://blog.gasol.tw/2011/05/php-manual-in-vim.html
 

添加新评论