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?
VimScript provides the ruby command that can be used to execute some Ruby code. Instead of using another VimScript function we can instead refer to it as a Ruby function or executed Ruby code. For a single line of Ruby code we can use the ruby command followed by your Ruby code.
Compiling Vim Using Sources CodeDownload the latest Vim source code from Github repository. Configure the source code according to your system environment. Compile and install Vim from Source code on your Linux system. Finally, Open Vim text editor on your system.
Some package provides vim-ruby on Ubuntu, for example vim-nox.
simply:
sudo apt-get install vim-nox;
will get you vim with ruby, as well as compiled in "support for scripting with Perl, Python, Ruby, and TCL but no GUI."
sudo apt-get install vim-rails
will install a "selection of vimscripts that make editing Ruby on Rails applications extremely easy." but as it depends on vim-full and vim-addon-manager, it will also install the vim-gnome version of the GUI, that is "a version of vim compiled with a GNOME2 GUI and support for scripting with Perl, Python, Ruby, and TCL."
I think "Compiling Vim With Ruby Integration On Snow Leopard" 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):
sudo apt-get install mercurial hg clone https://vim.googlecode.com/hg/ vim cd vim ./configure --enable-rubyinterp make sudo make install
To test if things look fancy:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With