Forked From https://github.com/vim-scripts/PDV--phpDocumentor-for-Vim
本项目从 vim-scripts/PDV--phpDocumentor-for-Vim
修改,新增支持PHP7版本
Clone the repository under your ~/.vim/bundle/
directory:
cd ~/.vim/bundle
git clone git://github.com/shawncplus/phpcomplete.vim.git
-
Install and configure the Vundle plugin manager, follow the instructions here
-
Add the following line to your
.vimrc
:Plugin 'liulipeng/PDV--phpDocumentor-for-Vim'
-
Source your
.vimrc
with:so %
or otherwise reload your vim -
Run the
:PluginInstall
commmand
" 设置版本、作者、版权等信息
let g:pdv_cfg_type="mixed"
let g:pdv_cfg_package="1.0"
let g:pdv_cfg_version="1.0"
let g:pdv_cfg_author="Lipeng Liu <[email protected]>"
let g:pdv_cfg_copyright="1997-2017 the xxx group"
let g:pdv_cfg_license="php version 7.1"
" 注释结束设置
let g:pdv_cfg_eol=""
" 是否显示继承
let g:pdv_cfg_uses=0
nnoremap <leader>doc :call phpdocsingle()<cr>
vnoremap <leader>doc :call phpdocrange()<cr>
Beside that it allows you to define default values for phpDocumentor tags
like @version (I use
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.