[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

VIM 7 Ruby

aidy

5/9/2006 1:14:00 PM

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

16 Answers

projecktzero

5/9/2006 1:34:00 PM

0

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.

aidy

5/9/2006 3:41:00 PM

0

The highlighing and indentation are fine, but according to this:
(http://www.rubygarden.org/ruby?VimR...), 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

Tim Hammerquist

5/9/2006 11:46:00 PM

0

aidy <aidy.rutter@gmail.com> wrote:
> The highlighing and indentation are fine, but according to this:
> (http://www.rubygarden.org/ruby?VimR...), 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

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.

That page discusses files in the vim-ruby project, a collection
of Ruby-related vimfiles to aid in Ruby coding and development
and is unrelated to (though may be useful for) Vim's +ruby
feature.

Tim Hammerquist

slunky

5/9/2006 11:50:00 PM

0

_/ 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.

--
-slunky

Tim Hammerquist

5/10/2006 12:33:00 AM

0

slunky <slunky@globalzero.org> wrote:
> _/ 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.

:help if_ruby

Tim Hammerquist

slunky

5/10/2006 1:06:00 AM

0

_/ Tim Hammerquist wrote \_
>:help if_ruby

Thank you.

--
-slunky

Tim Hammerquist

5/10/2006 6:54:00 AM

0

slunky <slunky@globalzero.org> wrote:
> _/ Tim Hammerquist wrote \_
> > :help if_ruby
>
> Thank you.

You're very welcome. :)

Cheers,
Tim Hammerquist

aidy

5/10/2006 11:36:00 AM

0

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?VimR...),
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

Tim Hammerquist

5/10/2006 2:23:00 PM

0

aidy <aidy.rutter@gmail.com> wrote:
> 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?VimR...), 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) "

None of the above involves Vim executing Ruby code directly.
The most the above items do is invoke the ruby executable from
within Vim.

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

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

Yes. On 3 platforms. Both with binary download, and built
custom from source.

> I was thinking of trying Emacs.

Please do. You should always experiment with your choices
whenever possible. But why would you mention this in c.l.ruby?

Tim Hammerquist

aidy

5/10/2006 4:02:00 PM

0

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

>> I was thinking of trying Emacs.

> 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