vim-perl-critic


Ⅰ. 插件描述

A perl critic plugin for vim which creates marks and an awesome quickfix list of your not-so-quick to fix errors (and marks in the margins).

Ⅱ. 基本信息

创建日期:  2010-04-20
使用用户:  2
Github星:  8
插件作者:  Matt Foster

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vim-Perl-Critic

A perl critic plugin for vim which creates marks and an awesome quickfix of
your not-so-quick to fix errors.

Usage:

Type <leader>cc (typically \cc), to fire up the quickfix list of your perl foibles.

To clear the signs from the margin, use:

    :sign unplace *

You can also set:

    autocmd! BufReadPost,BufWritePost,FileReadPost,FileWritePost *.pl call ShowCriticisms()
    autocmd! BufReadPost,BufWritePost,FileReadPost,FileWritePost *.pm call ShowCriticisms()

To have it run whenever you save or load a perl buffer.

Configuration:

The text, colours and criticism severity are configurable. To change them, just
set the following variables.

    let g:crit_low_sev_guifg='#004400'
    let g:crit_low_sev_guibg='#004400'
    let g:crit_low_sev_text='⑶ '
    let g:crit_low_sev_ctermfg='green'
    let g:crit_low_sev_ctermbg='black'

    let g:crit_med_sev_guifg='#bbbb00'
    let g:crit_med_sev_guibg='#bbbb00'
    let g:crit_med_sev_text='② '
    let g:crit_med_sev_ctermfg='cyan'
    let g:crit_med_sev_ctermbg='black'

    let g:crit_high_sev_guifg='#ff2222'
    let g:crit_high_sev_guibg='#ff2222'
    let g:crit_high_sev_text='① '
    let g:crit_high_sev_ctermfg='black'
    let g:crit_high_sev_ctermbg='red'

    let g:crit_severity_level=3

Be warned, there is no sanity checking of these, and empty text variables don't
work.

You'll need to ensure you've enabled ftplugin support. To do this, add:

    filetype plugin indent on

To your .vimrc

TODO:

See: http://github.com/mattfoster/vim-Perl-Critic/issues

添加新评论