aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin/perl.vim
blob: c492305190387fb66f3d36769a71f180e173481c (plain)
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 :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