sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 4/1, Downloaded by 274    Comments, bugs, improvements  Vim wiki

created by
Britton Kerin
 
script type
ftplugin
 
description
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.
 
install details
Its a standard vimball so all you need to do is:

     vim update_perl_line_directives.vba
     :so %
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
syntax_check_embedded_perl.vba 0.1 2011-01-19 7.0 Britton Kerin Initial upload
ip used for rating: 54.89.139.226

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo