I’m writing this post, not because there is a dearth of blog posts about getting Vim to play nicely with Python, but because the blog posts I followed referenced outdated versions of the python syntax highlighting scripts.
The syntax highlighting script I use is here. It has a number of improvements over the older syntax highlighting script I was using. e.g. the older script messed up all formatting after a base class definition like
class NewClass:, because it expected parentheses before the colon. The new script from the above link has fixed that issue.
For gvim / MacVim, I use the colour scheme from here. Unfortunately it doesn’t work in the non GUI Vim, so you have to use
colorscheme blackboard in your
~/.gvimrc, rather than your