aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-01-15 14:26:36 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-01-15 14:26:36 +1300
commit4c393bf3da37deafb83f1c6494176964291e56f7 (patch)
tree1f9ec1f3fcdb10ddc90e33063982f6a19078c7cf /vim/after
parentSome Perl shortcuts I use often (diff)
downloaddotfiles-4c393bf3da37deafb83f1c6494176964291e56f7.tar.gz
dotfiles-4c393bf3da37deafb83f1c6494176964291e56f7.zip
Safer syntax for command calls
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/perl.vim10
1 files 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 <leader>pc :!perl -c %<CR>
-
-" Run perlcritic over the current buffer
-nnoremap <leader>pl :!perlcritic %<CR>
-
+" Run perl -c on file for the current buffer
+nnoremap <leader>pc :exe "!perl -c " . shellescape(expand("%"))<CR>
+" Run perlcritic on the file for the current buffer
+nnoremap <leader>pl :exe "!perlcritic " . shellescape(expand("%"))<CR>
" Run the current buffer through perltidy
nnoremap <leader>pt :%!perltidy<CR>