perl_h2xs


Ⅰ. 插件描述

Automate creating perl modules via h2xs

Ⅱ. 基本信息

创建日期:  2002-10-30
使用用户:  1
Github星:  1
插件作者:  Colin Keith

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

The Perl_h2xs.vim plugin is a plugin that allows you to automate the process of perl module creation. Writing Perl modules with the recommended structure can be time consuming so this ftplugin automates the process by involking h2xs when you edit a non-existant .pm file. I.e.

  vim Test::Bob.pm

Will invoke h2xs -XAn Test::Bob, and if the module skeleton is created, will swap the edited file to Test/Bob/Bob.pm.

Through the use of variables, you can also set the plugin to create a MANIFEST.SKIP to exclude the CVS directories (and update the MANIFEST to include this new file) and to use CVS to import (or add) the newly created tree to a respository.

It works under windows and unix and you can even create .pm trees in another directory by specifying a directory name and module name in one. I.e.

vim /usr/local/src/Test/Bob.pm

would create the module:

/usr/local/src/Test/Bob/Bob.pm

See the readme file and help docs for detalis.

Enjoy, this is me being lazy :)

添加新评论