Setting up Python Code Completion in Mac OS X with Vim
The Problem
The vim editor that is shipped with Mac OS X is not compiled with Python support, so pysmell (a wonderful tool which we will install momentarily) won’t play nicely until we do something about that.
The Solution
1. hg clone https://vim.googlecode.com/hg/ vim
2. cd vim
3. ./configure —prefix=/usr/local —enable-rubyinterp —enable-pythoninterp —with-features=huge
4. make
5. make install
6. export PATH=/usr/local/bin:$PATH
7. pip install pysmell
8. In vimrc: autocmd FileType python setlocal omnifunc=pysmell#Complete
9. You’re all set!
