From 4c393bf3da37deafb83f1c6494176964291e56f7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 15 Jan 2015 14:26:36 +1300 Subject: Safer syntax for command calls --- vim/after/ftplugin/perl.vim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim index 866316f2..e06bf467 100644 --- a/vim/after/ftplugin/perl.vim +++ b/vim/after/ftplugin/perl.vim @@ -1,9 +1,7 @@ -" Run perl -c on the current buffer -nnoremap pc :!perl -c % - -" Run perlcritic over the current buffer -nnoremap pl :!perlcritic % - +" Run perl -c on file for the current buffer +nnoremap pc :exe "!perl -c " . shellescape(expand("%")) +" Run perlcritic on the file for the current buffer +nnoremap pl :exe "!perlcritic " . shellescape(expand("%")) " Run the current buffer through perltidy nnoremap pt :%!perltidy -- cgit v1.2.3