Tuesday, February 5, 2008

GVIM ♥ Python

When I'm not using UNIX, I'm not. To try and make things a little more tolerable, I use GVIM as much as possible. Unfortunately, the win32 GVIM release expects Python 2.4 if you want to use the amazing omnicomplete Python functions. I hit the wall today and broke down in tears, knowing that I had Python 2.5.1, but a GVIM that didn't use that.

The solution was to compile a GVIM executable myself! It turns out that it is fairly easy. I also assume that Vim is already installed.
  1. Download the source archives.
    1. ftp://ftp.vim.org/pub/vim/unix/vim-7.1.tar.bz2
    2. ftp://ftp.vim.org/pub/vim/extra/vim-7.1-extra.tar.gz
  2. Extract
  3. CD vim71\src
  4. "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
  5. nmake -f Make_mvc.mak FEATURES=HUGE GUI=yes OLE=yes MBYTE=yes IME=yes GIME=yes PYTHON=C:\Python25 DYNAMIC_PYTHON=yes PYTHON_VER=25 CSCOPE=yes
  6. Make sure the regular Vim 7.1 is installed. I used the installer located at ftp://ftp.vim.org/pub/vim/pc/gvim71.exe
  7. COPY /Y gvim.exe "C:\Program Files\Vim\vim71\gvim.exe"
  8. COPY /Y GvimExt\gvimext.dll "C:\Program Files\Vim\vim71\gvimext.dll"
  9. Turn up your Ashlee Simpson CD
That seems to be it. I didn't add support for TCL, Perl, or XPMs, but you're a smart kid. You can figure it out.

No comments:

Post a Comment