Michael Crosby


Compile Vim for Python

Update

I just added the newest MacVim compiled for python using the 10.7 Lion SDK. You can downloading it below.

If you want to use the Python auto complete in vim then you have to compile vim for python on your system. If you are running OSX I have just compiled MacVim for Snow Leopard and I am working on a compiled Lion version but the SL one works fine. Then you can setup an alias for vim so that it points to the binary in the MacVim app so you can still use vim from the command line and as the MacVim app.

It works really well and is fairly easy this way.

MacVim with Python SL MacVim with Python Lion

First download the already compiled MacVim.app from the link above and extract it to your Applications folder.

Then download:

pythoncomplete.vim

vim files and put it in your ~/.vim/autoload/ folder. It should be named:

pythoncomplete.vim

If you need, you can see my .dotfiles on github that already has my vimrc and vim dir in it.

My dotfiles

Then just add:

filetype plugin on

Last thing if you want to run this version form terminal just add:

alias vim=/Applications/MacVim.app/Contents/MacOS/Vim

to your ~/.bash_profile

You can see all these settings and more in my dotfiles.

All done. To use the auto complete just hit control+x then still holding down the control key it o

comments powered by Disqus