Forum: Ruby vim 7 ruby omni-complete v0.2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
77ec40c374b48e0048256aa9325ac35d?d=identicon&s=25 Mark Guzman (Guest)
on 2006-04-12 06:01
(Received via mailing list)
Thanks to some outside suggestions and contributions we now have another
release.
If you missed the original announcement, rbcomplete provides a vim7
omni-completion function (code completion) for vim. It is
based on complete.rb, pycomplete.vim and ccomplete.vim.

Whats New:
------------
At the request of many people, Object's instance methods are no longer
included in the completion list, if anyone wants this functionality
back I'll make it a configurable.
A major contribution provided rbcomplete.vim with better variable
identification so the following will properly be completed:
a = Time.now
b = [0..2]
c = ['a','b']
d = {:a=>'test',:b=>'this'}

sorry, no "e = c" yet. You can find the file at
http://blog.hasno.info/blog/segfault/dev/2006/04/1...
  --mark
3cb4fdcf13aad6a7dcae83876b0e784e?d=identicon&s=25 Josef 'Jupp' SCHUGT (Guest)
on 2006-04-12 16:32
(Received via mailing list)
Hi!

At Wed, 12 Apr 2006 13:00:06 +0900, Mark Guzman wrote:
> http://blog.hasno.info/blog/segfault/dev/2006/04/1...

500 Internal Server Error for me :-|

Josef 'Jupp' Schugt
77ec40c374b48e0048256aa9325ac35d?d=identicon&s=25 Mark Guzman (Guest)
on 2006-04-12 18:31
(Received via mailing list)
Seems to be working currently. Could be that my old box doesn't agree w/
the increased traffic.
  --mark
2e4c409c50b3854950fa624488265929?d=identicon&s=25 Andrew Thompson (vagabond)
on 2006-04-12 20:38
Well, once I stripped all the carraige returns from the .vim file, it
kinda worked. When I did ctrl+x ctrl+o it opened a list of classes, but
it always replaced whatever was under the cursor with TrueClass and
that's all I could get it to do... Am I missing something?

Andrew
52a177e9dbd3e614825aabc4e45f8cd6?d=identicon&s=25 Mark Volkmann (Guest)
on 2006-04-12 21:00
(Received via mailing list)
On 4/11/06, Mark Guzman <segfault@hasno.info> wrote:
> Thanks to some outside suggestions and contributions we now have another
> release.
> If you missed the original announcement, rbcomplete provides a vim7
> omni-completion function (code completion) for vim. It is
> based on complete.rb, pycomplete.vim and ccomplete.vim.

Where are we supposed to put the rbcomplete.vim file?
2e4c409c50b3854950fa624488265929?d=identicon&s=25 Andrew Thompson (vagabond)
on 2006-04-12 22:19
Mark Volkmann wrote:
> Where are we supposed to put the rbcomplete.vim file?

I put mine in ~/.vim/autoload and it seems to load OK.

Andrew
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2006-04-12 23:20
(Received via mailing list)
On Thu, 13 Apr 2006, Andrew Thompson wrote:

> Mark Volkmann wrote:
>> Where are we supposed to put the rbcomplete.vim file?
>
> I put mine in ~/.vim/autoload and it seems to load OK.

i get an error about no 'omnifunc' attribute.  which vim are you
running?

-a
52a177e9dbd3e614825aabc4e45f8cd6?d=identicon&s=25 Mark Volkmann (Guest)
on 2006-04-12 23:36
(Received via mailing list)
On 4/12/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Thu, 13 Apr 2006, Andrew Thompson wrote:
>
> > Mark Volkmann wrote:
> >> Where are we supposed to put the rbcomplete.vim file?
> >
> > I put mine in ~/.vim/autoload and it seems to load OK.
>
> i get an error about no 'omnifunc' attribute.  which vim are you running?

It's working for me now.  Here's what I did to get it to work under
Windows.

- download gvim70d.exe from ftp://ftp.vim.org/pub/vim/unstable/pc
- double-click the .exe file
- add the following to _vimrc
    autocmd FileType ruby,eruby
    set omnifunc=rbcomplete#Complete
- from a command prompt, run "gem install vim-ruby
- download rbcomplete.vim from
http://blog.hasno.info/blog/segfault/dev/2006/04/1...
  into $VIM_HOME\autoload
245cfab887781bdf3f53178b794c42dc?d=identicon&s=25 Alexandru E. Ungur (Guest)
on 2006-04-13 00:18
(Received via mailing list)
>>> sender: "ara.t.howard@noaa.gov" date: "Thu, Apr 13, 2006 at 06:20:10AM +0900" <<<EOQ
> On Thu, 13 Apr 2006, Andrew Thompson wrote:
>
> >Mark Volkmann wrote:
> >>Where are we supposed to put the rbcomplete.vim file?
> >
> >I put mine in ~/.vim/autoload and it seems to load OK.
>
> i get an error about no 'omnifunc' attribute.  which vim are you running?
Omnifunc was introduced in version 7:
Though it's still beta, alfa has been stable for a long time already :)

Good luck,
Alex
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2006-04-13 01:20
(Received via mailing list)
On Thu, 13 Apr 2006, Alexandru E. Ungur wrote:

> Though it's still beta, alfa has been stable for a long time already :)
>
> Good luck,
> Alex

time to upgrade then... ;-)

-a
63e5a5c299c29f41a55bb6cab0153230?d=identicon&s=25 unknown (Guest)
on 2006-04-19 16:25
(Received via mailing list)
> Thanks to some outside suggestions and contributions we now have
> another
> release.
> If you missed the original announcement, rbcomplete provides a vim7
> omni-completion function (code completion) for vim. It is
> based on complete.rb, pycomplete.vim and ccomplete.vim.

Very cool.  I just grabbed gentoo's vim 7.0b, and there were a couple
of issues.  Vim doesn't like the windows endlines at all, and claims
the whole script is garbage.  dos2unix fixes that nicely :)  The other
(really strange) thing is that you use some sort of heredoc with the
tag RUBYEOF.  Gentoo's vim7.0b doesn't like that at all; it doesn't
recognize the final RUBYEOF as the end of the string.  Changing that to
EOF fixed things.  Anyhow, not sure it that's worth making changes for,
but it's what I had to do.
Fcc5cdf0f0f3e1a3a39c11ed4bf8d5e5?d=identicon&s=25 Stephan Mueller (Guest)
on 2006-04-19 16:56
(Received via mailing list)
* Mark Volkmann <r.mark.volkmann@gmail.com> [060412 23:44]:
> - add the following to _vimrc
>     autocmd FileType ruby,eruby
>     set omnifunc=rbcomplete#Complete

with the recent versions of rubycomplete.vim the last line has to be

      set omnifunc=rubycomplete#Complete

Tried it with vim70e on linux and seems to be working great! Thanks for
this smart enhancement.


Cheers,

Steph.
Fcc5cdf0f0f3e1a3a39c11ed4bf8d5e5?d=identicon&s=25 Stephan Mueller (Guest)
on 2006-04-19 17:30
(Received via mailing list)
* tsuraan@tsuraan.net <tsuraan@tsuraan.net> [060419 16:31]:
>
> Very cool.  I just grabbed gentoo's vim 7.0b, and there were a couple
> of issues.  Vim doesn't like the windows endlines at all, and claims
> the whole script is garbage.  dos2unix fixes that nicely :)  The other
> (really strange) thing is that you use some sort of heredoc with the
> tag RUBYEOF.  Gentoo's vim7.0b doesn't like that at all; it doesn't
> recognize the final RUBYEOF as the end of the string.  Changing that
> to EOF fixed things.  Anyhow, not sure it that's worth making changes
> for, but it's what I had to do.

yup, forgot to mention the endlines in my other post. flip -u did the
job. No problems with RUBYEOF here (with vim 7.0d)

Cheers,

Steph.
Ddbd8bc32e3a87163b4658b2785d2082?d=identicon&s=25 Mark Somerville (Guest)
on 2006-04-25 11:30
(Received via mailing list)
On Wednesday 12 April 2006 19:38, Andrew Thompson wrote:
> Well, once I stripped all the carraige returns from the .vim file, it
> kinda worked. When I did ctrl+x ctrl+o it opened a list of classes, but
> it always replaced whatever was under the cursor with TrueClass and
> that's all I could get it to do... Am I missing something?

I'm getting exactly the same results.

Mark
77ec40c374b48e0048256aa9325ac35d?d=identicon&s=25 Mark Guzman (Guest)
on 2006-04-26 16:29
(Received via mailing list)
Mark Somerville wrote:
> Mark
>
Are you using 0.2, 0.4 or the current cvs head?
By default, when your not within a class, it returns a list of globals
and classes.
Originally the global code did not take into account input, the current
cvs head does (as does 0.4 I believe).
  --mark
2e4c409c50b3854950fa624488265929?d=identicon&s=25 Andrew Thompson (Guest)
on 2006-04-26 18:10
Mark Guzman wrote:
> Are you using 0.2, 0.4 or the current cvs head?
> By default, when your not within a class, it returns a list of globals
> and classes.
> Originally the global code did not take into account input, the current
> cvs head does (as does 0.4 I believe).
>   --mark

You should do proper releases then, not just uploading over the old
file... Where can I get 0.4?

Andrew
77ec40c374b48e0048256aa9325ac35d?d=identicon&s=25 Mark Guzman (Guest)
on 2006-04-26 22:50
(Received via mailing list)
Andrew Thompson wrote:
> You should do proper releases then, not just uploading over the old
> file... Where can I get 0.4?
>
> Andrew
>
>
Same site
http://blog.hasno.info/blog/segfault/dev/2006/04/1...
I will update the blog entry to note the current version,
rubycomplete.vim is actually just a symlink to
rubycomplete-0.4.vim currently. There was also another ANN email sent
regarding 0.4.
  --mark
This topic is locked and can not be replied to.