" The Python runtime files didn't define b:undo_ftplugin until Vim v8.1.1048; " if it's not set yet, set it here (to something innoccuous) so that the " appending :let commands in the rest of this file don't break. " if !exists('b:undo_ftplugin') let b:undo_ftplugin = 'setlocal tabstop<' endif " Use pyflakes for syntax checking and autopep8 for tidying compiler pyflakes if executable('autopep8') setlocal equalprg=autopep8\ -aaa\ --\ - let b:undo_ftplugin .= '|setlocal equalprg<' endif " Stop here if the user doesn't want ftplugin mappings if exists('no_plugin_maps') || exists('no_python_maps') finish endif " Mappings to choose compiler nnoremap c \ :compiler pyflakes nnoremap l \ :compiler pylint let b:undo_ftplugin .= '|nunmap c' \ . '|nunmap l' " Mappings to choose 'equalprg' nnoremap t \ :setlocal equalprg=autopep8\ -aaa\ --\ - nnoremap i \ :setlocal equalprg< let b:undo_ftplugin .= '|nunmap t' \ . '|nunmap i'