diff options
Diffstat (limited to 'vim/ftplugin/perl.vim')
-rw-r--r-- | vim/ftplugin/perl.vim | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim index 53341183..c4923051 100644 --- a/vim/ftplugin/perl.vim +++ b/vim/ftplugin/perl.vim @@ -1,6 +1,11 @@ -" Run perl -c on file for the current buffer -nnoremap <LocalLeader>pc :exe "!perl -c " . shellescape(expand("%"))<CR> -" Run perlcritic on the file for the current buffer -nnoremap <LocalLeader>pl :exe "!perlcritic " . shellescape(expand("%"))<CR> -" Run the current buffer through perltidy -nnoremap <LocalLeader>pt :%!perltidy<CR> +" External commands for Perl files +if exists('*shellescape') + + " Run perl -c on file for the current buffer + nnoremap <LocalLeader>pc :exe "!perl -c " . shellescape(expand("%"))<CR> + " Run perlcritic on the file for the current buffer + nnoremap <LocalLeader>pl :exe "!perlcritic " . shellescape(expand("%"))<CR> + " Run the current buffer through perltidy + nnoremap <LocalLeader>pt :%!perltidy<CR> + +endif |