Showing posts with label cygwin. Show all posts
Showing posts with label cygwin. Show all posts

Tuesday, March 17, 2009

Vim + Cygwin Improvements

I've been stuck in a Windows environment at work for the last month or so doing Blackberry development. To try and make things more tolerable, I've been doing most of my work in a Cygwin environment; however, the Cygwin Vim build is sub-optimal compared to the native Windows build. This lead me to try and find a way to use Windows Vim seamlessly from inside Cygwin. The following alias worked out nicely:

[bash-fu borrowed from this tip]

alias vim='VIM=`cygpath -d "$VIM"` HOME=`cygpath -d "$HOME"` "`cygpath -u "$VIM"`/vim72/vim.exe"'

In this case, the $VIM environment variable is initially set to C:\Program Files\Vim. It's also important to change the vim72 version number to whatever matches your install.

The second thing I did, which is making life a lot easier, is switch to using Console2 as a replacement for the standard Windows cmd.exe. The combo of Console2, Cygwin, and a decent Vim build is a good bet if you're committed to Windows for whatever reason.