Ⅰ. 插件描述
Provides really comfortable generation of phpDocumentor doc blocks for PHP4 & 5.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/pdv-phpdocumentor-for-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/pdv-phpdocumentor-for-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/pdv-phpdocumentor-for-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/PDV--phpDocumentor-for-Vim
Ⅳ. 文档说明
PDV (phpDocumentor for Vim)
Version: 1.0.0
Copyright 2005 by Tobias Schlitt <toby@php.net>
Inspired by phpDoc script for Vim by Vidyut Luther (http://www.phpcult.com/).
Provided under the GPL (http://www.gnu.org/copyleft/gpl.html).
This script provides functions to generate phpDocumentor conform
documentation blocks for your PHP code. The script currently
documents:
- Classes
- Methods/Functions
- Attributes
All of those supporting all PHP 4 and 5 syntax elements.
Beside that it allows you to define default values for phpDocumentor tags
like @version (I use $id$ here), @author, @license and so on.
For function/method parameters and attributes, the script tries to guess the
type as good as possible from PHP5 type hints or default values (array, bool,
int, string...).
You can use this script by mapping the function PhpDoc() to any
key combination. Hit this on the line where the element to document
resides and the doc block will be created directly above that line.
Changelog
Version 1.0.0
- Created the initial version of this script while playing around with VIM
scripting the first time and trying to fix Vidyut's solution, which
resulted in a complete rewrite.