Ⅰ. 插件描述
Vim plugin enabling you to search php.net manualⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'erikfercak/php-search-doc'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'erikfercak/php-search-doc'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'erikfercak/php-search-doc'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/erikfercak/php-search-doc
Ⅳ. 文档说明
search-php-doc lets you search http://php.net/.
If you want something similar for jQuery API documentation see
vim-jquery-doc.
Or even ruby:
vim-ruby-doc.
Installation
Either use pathogen.vim:
cd ~/.vim/bundle
git clone git://github.com/erikfercak/php-search-doc.git
or you can copy it into your ~/.vim directory manually.
How to use it
When your cursor is on something you would look up, type:
<Leader>pffor php function search<Leader>pmfor whole manual search
and the plugin will open a new tab in your browser (or a
new instance of the browser) to the related docs. See the following section
for changing mappings.
Configure it
By default, the plugin uses the
open command (OSX) but you can change it rather easily. If you are on Linux machine you
can change it to xdg-open
like this:
let g:php_search_doc_command='xdg-open'
Furthermore you can choose your own mapping in the following way:
let g:php_search_doc_manual_mapping='KK'
There are g:php_search_doc_function_mapping and g:php_search_doc_manual_mapping
variables available.
Contributors
License
Copyright (c) Luca Pette. Distributed under the same terms as Vim itself. See :help license.
Copyright (c) Erik Fercak. Heavily inspired and copied from vim-ruby-doc plugin:
https://github.com/lucapette/vim-ruby-doc
Distributed under the same terms as Vim itself. See :help license.