" Extra configuration for Perl filetypes if &filetype != 'perl' || &compatible || v:version < 700 finish endif " Use Perl itself for checking and Perl::Tidy for tidying compiler perl setlocal equalprg=perltidy let b:undo_ftplugin = b:undo_ftplugin \ . '|unlet b:current_compiler' \ . '|setlocal equalprg<' \ . '|setlocal errorformat<' \ . '|setlocal makeprg<' " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_perl_maps') finish endif " Mappings to choose compiler nnoremap c \ :compiler perl nnoremap l \ :compiler perlcritic let b:undo_ftplugin = b:undo_ftplugin \ . '|nunmap c' \ . '|nunmap l' " Bump version numbers nmap v \ PerlVersionBumpMinor nmap V \ PerlVersionBumpMajor let b:undo_ftplugin = b:undo_ftplugin \ . '|nunmap v' \ . '|nunmap V'