tags:

views:

99

answers:

5

I'm trying to get command-t installed for vim but my current version of vim doesn't have the (+ruby) flag. The command "which ruby" shows that ruby is installed.

What do I need to do in order to activate the +ruby flag in vim?

Also, what does the +ruby flag technically mean?

A: 

Flag +ruby means that vim is compiled with ruby support and linked against ruby interpreter library. You cannot get this flag without recompiling vim or installing another version which is compiled with this flag.

ZyX
A: 

when you run ./configure you need to add the folowing --enable-rubyinterp

./configure --enable-rubyinterp
skeept
A: 

If there isn't a ruby enabled Vim available for your operating system, you'll have to recompile. This is very easy and there are some instructions on the Vim website I believe. If you're on Linux, you use configure to choose what you want. Have a look at the output of:

./configure --help

in the Vim source directory. Read it carefully, there are a lot of options in there. The main one you want is --enable-rubyinterp, but you may also want to add --with-feature=HUGE among others. As I said, read it carefully.

Al
A: 

I think this might actually help. I'm on exactly same boat at the moment.


Ok... got it to work. Took me like half hour or so.

This should help (I got Ubuntu):

  1. sudo apt-get install mercurial
  2. hg clone https://vim.googlecode.com/hg/ vim
  3. cd vim
  4. ./configure --enable-rubyinterp
  5. make
  6. sudo make install

To test if things look fancy:

  1. vim --version | grep ruby

Should return something like:

-python3 +quickfix +reltime -rightleft +ruby +scrollbind +signs +smartindent

Ruby should have plus now. Another trick to test it - enter vim and hit :ruby 1. Should not fail.

Arnis L.
A: 

If you are lazzy and don't want to recompile you can try to find a package with a vim version including ruby. On debian it's vim-ruby so something like

apt-get install vim-ruby 

might work. (I can't try it, I m on mac. On mac , MacVim come with ruby enabled)

mb14