Perldoc from VIM


Ⅰ. 插件描述

Perldoc from VIM

Ⅱ. 基本信息

创建日期:  2005-02-24
使用用户:  1
Github星:  1
插件作者:  Johannes Petzold

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Perldoc-from-VIM

Ⅳ. 文档说明

This script gives you direct access to perldoc documentation from inside VIM.
Perldoc support is automatically activated when editing perl files.

Requirements: "perl" v5.004 (or better) and "perldoc" must be accessible from your command line. Also, module Pod::Text::Termcap must be installed.

Usage: After installing (see below), edit a perlfile, press <F3>, enter name of wanted perldoc-page.
A new window is opened (presuming the wanted page exists), hopefully containing what you're looking for - a perldoc page, tuned up with some VIM syntaxhighlighting, generated from POD informations.

Perldoc pages that have already been retrieved earlier are taken from cache.
This speeds up the search and avoids double generation of VIM's synhighlight-commands.

You'll need to specify a directory where the cached perldoc-pages will be stored. This is done in the 2nd line of pdoc4vim.vim (you'll be guided there automatically if a valid entry couldn't be found).
Of course you can change the perldoc-key (default: F3) too, just check out the first lines from pdoc4vim.vim.

添加新评论