Vim 7 ruby omni-complete 0.4

Once again after some work and outside contribution we have another
release

If you missed the original announcement, rubycomplete provides a vim7
omni-completion function (code completion) for vim. It is based on
complete.rb, pycomplete.vim and ccomplete.vim. Any input is welcome.

I’ve joined up with the vim-ruby team, so you’ll find rubycomplete.vim
in cvs at
http://vim-ruby.rubyforge.org in addition to my site which will only
carry my full
releases.

Whats New:

  • Renamed per discussion on completion file naming on the vim-dev
    mailing list

  • In-buffer class parsing and completion - You can now complete methods
    for classes
    defined in the current buffer. If you are within a class
    definition, the completion
    code assumes your referencing self. Vim will attempt to load any
    inherited classes and
    included modules as required.

  • Initial rails support - rubycomplete now attempts to figure out if
    your editing a file
    that is part of a rails project. If configured to do so, it will
    load the rails
    environment ala script/console to allow completion of rails
    objects.

  • Bugfixes - missing some range variable definitions
    - fun crash when completing the list of global symbols

http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html
–mark

Hi Mark.

Thank you for the really nice software. I’ve downloaded rubycomplete
from vim-ruby.rubyforget.org and it worked smoothly.

But I have a suggestion for vim-ruby. It seems that the site has never
released source after Oct. 7, 2005. Is it possible to release a new
version including rubycomplete.rb?

Of course, it’s possible to download rubycomplete via CVS, it isn’t seem
to be enough. People who does not check CVS (like me) have trouble to
find new release. Just my one penny.

Sincerely,
Minkoo S.

Mark G. wrote:

Once again after some work and outside contribution we have another
release

If you missed the original announcement, rubycomplete provides a vim7
omni-completion function (code completion) for vim. It is based on
complete.rb, pycomplete.vim and ccomplete.vim. Any input is welcome.

I’ve joined up with the vim-ruby team, so you’ll find rubycomplete.vim
in cvs at
http://vim-ruby.rubyforge.org in addition to my site which will only
carry my full
releases.

Whats New:

  • Renamed per discussion on completion file naming on the vim-dev
    mailing list

  • In-buffer class parsing and completion - You can now complete methods
    for classes
    defined in the current buffer. If you are within a class
    definition, the completion
    code assumes your referencing self. Vim will attempt to load any
    inherited classes and
    included modules as required.

  • Initial rails support - rubycomplete now attempts to figure out if
    your editing a file
    that is part of a rails project. If configured to do so, it will
    load the rails
    environment ala script/console to allow completion of rails
    objects.

  • Bugfixes - missing some range variable definitions
    - fun crash when completing the list of global symbols

http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html
–mark

On Thu, Apr 20, 2006 at 08:43:13PM +0900, Minkoo S. wrote:

Hi Mark.

Thank you for the really nice software. I’ve downloaded rubycomplete
from vim-ruby.rubyforget.org and it worked smoothly.

But I have a suggestion for vim-ruby. It seems that the site has never
released source after Oct. 7, 2005. Is it possible to release a new
version including rubycomplete.rb?

Coming later today or tomorrow.

Regards,
Doug

Hi.

I’ve installed vim7.0e and rubycomplete.rb. In GVIM on Windows XP,
everything seemed to be good. Unfortunately, however, it raises the
following error when I press ^X, ^O:

Error detected while processing function rubycomplete#Complete:
line 21:
NameError: (eval):143:in get_completions': (eval):1:inget_completions’: uninitialized constant Foo

Source code is as below:

class Foo
def bar
end
end

arr = []
arr.collect

f = Foo.new
f. <- I’ve pressed ^X, ^O right after ‘.’

Is this installation problem? Anyone knows why rubycomplete fails in
Linux?

Sincerely,
Minkoo S.

Sorry. I forgot to mention that this error raises on Linux only.

Minkoo S. wrote:

Hi.

I’ve installed vim7.0e and rubycomplete.rb. In GVIM on Windows XP,
everything seemed to be good. Unfortunately, however, it raises the
following error when I press ^X, ^O:

Error detected while processing function rubycomplete#Complete:
line 21:
NameError: (eval):143:in get_completions': (eval):1:inget_completions’: uninitialized constant Foo

Error detected while processing function rubycomplete#Complete:
line 21:
NameError: (eval):143:in get_completions': (eval):1:inget_completions’: uninitialized constant Foo
Linux version here as well, your code works, so it’s not Linux
specific, but rather installation specific.

ruby -v

ruby 1.8.4 (2005-12-24) [i686-linux]

vim --version

VIM - Vi IMproved 7.0b BETA

All the best,
Alex