vim: refactorized the python snippet 'script'