aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin/perl.vim
blob: 310ffe7e26cace8b2ea3208c607c8237167bb737 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
" External commands for Perl files
if exists('*shellescape')

  " Run perl -c on file for the current buffer
  nnoremap <LocalLeader>pc :execute "!perl -c " . shellescape(expand("%"))<CR>
  " Run perlcritic on the file for the current buffer
  nnoremap <LocalLeader>pl :execute "!perlcritic " . shellescape(expand("%"))<CR>
  " Run the current buffer through perltidy
  nnoremap <LocalLeader>pt :%!perltidy<CR>

endif