How can I use the Homebrew Python version with Homebrew MacVim on Snow Leopard?

First, remove MacVim if you've already installed it: brew remove macvim

Next, edit MacVim's Formula with the command: brew edit macvim. Find the arguments list (begins with args = %W[ ...), and modify this line:

--enable-pythoninterp

Change it to these two lines:

--enable-pythoninterp=dynamic
--with-python-config-dir=/usr/local/lib/python2.7/config

(this config dir should be symlinked to /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/Current/lib/python2.7/config)

Now when you reinstall MacVim with brew install macvim, it will use your Python 2.7 installation.

:python print(sys.version)

2.7.3 (default, Apr 16 2012, 23:20:02) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)]