" Extra configuration for Perl filetypes if &filetype !=# 'perl' || v:version < 700 || &compatible finish endif " Use Perl itself for checking and Perl::Tidy for tidying compiler perl setlocal equalprg=perltidy let b:undo_ftplugin .= '|unlet b:current_compiler' \ . '|setlocal equalprg< errorformat< makeprg<' " Add angle brackets to pairs of matched characters for q<...> setlocal matchpairs+=<:> let b:undo_ftplugin .= '|setlocal matchpairs<' " 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 .= '|nunmap c' \ . '|nunmap l' " Bump version numbers nmap v \ (PerlVersionBumpMinor) nmap V \ (PerlVersionBumpMajor) let b:undo_ftplugin .= '|nunmap v' \ . '|nunmap V'