VIM 7 Ruby

A

aidy

Hi,

I have installed the VIM 7 editor on Win32 and typed ':help ruby'. I
receive this message

'The Ruby interface only works when Vim was compiled with the |+ruby|
feature.'

I have looked on Ruby.org (http://vim-ruby.rubyforge.org/) and I am
told that the Ruby configuration files should be pre-packed with VIM 7.

Not so sure what to do now. Any ideas?

Thanks

Aidy
 
P

projecktzero

I think that the +ruby feature is only if you want to write VIM scripts
in Ruby. The Ruby syntax highlighting should still work when you edit
Ruby programs/scripts because the ruby.vim plug comes with VIM7.
 
A

aidy

The highlighing and indentation are fine, but according to this:
(http://www.rubygarden.org/ruby?VimRubySupport), I should be able to
run any Ruby command through VIM via the ruby plugins.

I have also entered these parameters in the _vimrc file

set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins

Cheers

Aidy
 
S

slunky

_/ Tim Hammerquist wrote \_
Could you point me toward the section on that page that
discusses Vim executing Ruby commands? I can't seem to find any
mention of "+ruby" or "if_ruby", nor any samples of any case
where Vim is *executing* Ruby.

I'm interested in that too. My editor of choice is vim, and I would love
to use the built-in Ruby interpretor. I DO have it compiled in, I just
don't know how to use it.
 
A

aidy

Hi Tim,
Could you point me toward the section on that page that discusses Vim executing Ruby commands?

At the top of the link (http://www.rubygarden.org/ruby?VimRubySupport),
we have this:

"If you install Vim 7.x, the following Ruby support is enabled out of
the box:

syntax highlighting for Ruby and eRuby
automatic, smart indenting for Ruby and eRuby
compiler plugins for running Ruby, eRuby and Test::Unit
IntelliSense-like autocompletion (Vim 7 only) "

As has been mentioned if we enter

':help ruby'

Then 'Ctrl ]' on the 'ruby-commands' tag we get:

':rub[y] {cmd} Execute Ruby command {cmd}'

This indicates to me that we could go:

':ruby puts "OK"'

But I receive 'command not available in this version.'

I think it may have something to do with the runtimepath. Has anyone
got Ruby working within VIM?

I was thinking of trying Emacs.

Aidy
 
A

aidy

Hi Tim

As has been mentioned if we enter
':help ruby'
Then 'Ctrl ]' on the 'ruby-commands' tag we get:
':rub[y] {cmd} Execute Ruby command {cmd}'
This indicates to me that we could go:
':ruby puts "OK"'
But I receive 'command not available in this version.'
The :ruby command requires +ruby support compiled in. Check
your :ver output and look for the '+ruby'. It needs to be
a '+'. If you see a '+dyn/ruby', you must also have
a compatible ruby library installed on your system. (I haven't
had much luck personally with dynamic language interface support
in Vim. YMMV.)

Thanks for the command ':ver' I have a '-ruby'.
Please do. You should always experiment with your choices
whenever possible. But why would you mention this in c.l.ruby?

I understand that Emacs has a Ruby mode.

Cheers

Aidy
 
A

aidy

Hi Tim,

I am using the self-executable download
'ftp://ftp.vim.org/pub/vim/pc/gvim70.exe' and for some reason
gVim has '+ruby\dyn' while Vim has -ruby when I execute :ver.

Is it possible to use ruby in the console interface?

Aidy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top