vim-perlbrew


Ⅰ. 插件描述

Put the version number of your current Perlbrew-managed Perl in Vim's status line

Ⅱ. 基本信息

创建日期:  2011-02-13
使用用户:  1
Github星:  5
插件作者:  Peter Aronoff

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-perlbrew

Display the active Perlbrew-installed Perl interpreter in your Vim status line.

Installing

Using Pathogen: clone this repository into ~/.vim/bundle. This is the easiest way.

Manually: Copy perlbrew.vim into your ~/.vim/plugin directory.

Status line

To add the active Perl interpreter to your status line:

set statusline+=%{perlbrew#statusline()}

Or you could get fancy and do something like this:

set statusline=[%n]\ %<%.99f\ %h%w%m%r%y%{exists('g:loaded_perlbrew')?perlbrew#statusline():''}%=%-16(\ %l,%c-%v\ %)%P

It's a good idea to include the exists check. That way, even if you share your vimrc between machines, you won't have trouble if one of them doesn't have this plugin installed.

If you prefer to see the version number only when you're editing a Perl file, replace the perlbrew#statusline() function with perlbrew#statusline_ft_perl().

添加新评论