Install Ruby support for VIM on Mac OS X
Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great.
It also has Ruby pre-installed (version 1.8.7) which is great too.
However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enab开发者_StackOverflow中文版led).
How to enable ruby for my VIM installation?
While it's possible to build and install your own Vim to replace the pre-installed version, I don't recommend it. It's far easier to just use MacVim instead:
http://code.google.com/p/macvim/
MacVim is a very Mac-friendly version of Vim, and it's got Ruby support already built in. It can be used as both a GUI and Terminal application. (Check out :help macvim-start
from within MacVim for details.)
+1 for MacVim - I also use it and love it.
But if you want a fresh vim compiled with ruby support, you can build one from scratch on OSX by following this article:
http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/
Only took me about 5 minutes to do...
精彩评论