syntax_check_embedded_perl.vim


Ⅰ. 插件描述

automatically check the syntax of embedded perl code in vim scripts on save

Ⅱ. 基本信息

创建日期:  2011-01-19
使用用户:  2
Github星:  3
插件作者:  Britton Kerin

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This script eases development of vim scripts that use embedded perl code by automatically checking the embedded perl code for compile-time errors when the scripts are saved.

So if you save a file with a syntax error you will get a message something like this:

     :!~/.vim/syntax_check_embedded_perl.perl /some/file.vim /tmp/BjPcoMnIoe
     Global symbol "$syn_error_var" requires explicit package name at /some/file.vim line 42.
     BEGIN not safe after errors--compilation aborted at /some/file.vim line 46.
    
     /some/file.vim has embedded perl compilation errors.  The file has been saved anyway, but a copy of the old (pre-save) version of the file is available in /tmp/BjPcoMnIoe
    
     shell returned 1

     Press ENTER or type command to continue

This supports a style of programming where source files are kept  with
valid syntax.  This is a particularly useful approach when embedding perl
in vim as error propagation up through vim can get a bit wild.

See also http://www.vim.org/scripts/script.php?script_id=3406 for better
run-time error diagnostics.

添加新评论