diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-01-15 14:26:36 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-01-15 14:26:36 +1300 |
commit | 4c393bf3da37deafb83f1c6494176964291e56f7 (patch) | |
tree | 1f9ec1f3fcdb10ddc90e33063982f6a19078c7cf /vim/after/ftplugin | |
parent | Some Perl shortcuts I use often (diff) | |
download | dotfiles-4c393bf3da37deafb83f1c6494176964291e56f7.tar.gz dotfiles-4c393bf3da37deafb83f1c6494176964291e56f7.zip |
Safer syntax for command calls
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r-- | vim/after/ftplugin/perl.vim | 10 |
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> |