在Mac OS X上安装对VIM的Ruby支持

时间:2020-11-26 02:42:41

Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great.

Mac OS X 10.6 (Snow Leopard)预装了VIM(7.2版),这很棒。

It also has Ruby pre-installed (version 1.8.7) which is great too.

它还预装了Ruby(版本1.8.7),这也很棒。

However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enabled).

但是,我希望在VIM中实现Ruby自动完成。查找VIM版本(VIM—version)显示-ruby(即ruby支持未启用)。

How to enable ruby for my VIM installation?

如何为我的VIM安装启用ruby ?

2 个解决方案

#1


14  

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:

虽然可以构建并安装您自己的Vim来替换预安装的版本,但我不建议这样做。仅仅使用MacVim要容易得多:

http://code.google.com/p/macvim/

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.)

MacVim是一个非常适合mac的Vim版本,并且已经内置了Ruby支持。它可以用作GUI和终端应用程序。(详情请参阅:帮助MacVim从MacVim内部开始。)

#2


2  

+1 for MacVim - I also use it and love it.

+1代表MacVim -我也喜欢它。

But if you want a fresh vim compiled with ruby support, you can build one from scratch on OSX by following this article:

但是,如果您希望使用ruby支持来编译一个新鲜的vim,您可以在OSX上从头开始构建一个。

http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/

http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/

Only took me about 5 minutes to do...

只花了我5分钟……

#1


14  

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:

虽然可以构建并安装您自己的Vim来替换预安装的版本,但我不建议这样做。仅仅使用MacVim要容易得多:

http://code.google.com/p/macvim/

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.)

MacVim是一个非常适合mac的Vim版本,并且已经内置了Ruby支持。它可以用作GUI和终端应用程序。(详情请参阅:帮助MacVim从MacVim内部开始。)

#2


2  

+1 for MacVim - I also use it and love it.

+1代表MacVim -我也喜欢它。

But if you want a fresh vim compiled with ruby support, you can build one from scratch on OSX by following this article:

但是,如果您希望使用ruby支持来编译一个新鲜的vim,您可以在OSX上从头开始构建一个。

http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/

http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/

Only took me about 5 minutes to do...

只花了我5分钟……