Helper functions for writing Vim plugins with Python