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.
Mark G. (Guest)
on 2006-04-12 08: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
Josef 'Jupp' SCHUGT (Guest)
on 2006-04-12 18:32
(Received via mailing list)
Hi!

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

500 Internal Server Error for me :-|

Josef 'Jupp' Schugt
Mark G. (Guest)
on 2006-04-12 20:31
(Received via mailing list)
Seems to be working currently. Could be that my old box doesn't agree w/
the increased traffic.
  --mark
Andrew T. (Guest)
on 2006-04-12 22: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
Mark V. (Guest)
on 2006-04-12 23:00
(Received via mailing list)
On 4/11/06, Mark G. <removed_email_address@domain.invalid> 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?
Andrew T. (Guest)
on 2006-04-13 00:19
Mark V. wrote:
> Where are we supposed to put the rbcomplete.vim file?

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

Andrew
unknown (Guest)
on 2006-04-13 01:20
(Received via mailing list)
On Thu, 13 Apr 2006, Andrew T. wrote:

> Mark V. 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
Mark V. (Guest)
on 2006-04-13 01:36
(Received via mailing list)
On 4/12/06, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid> wrote:
> On Thu, 13 Apr 2006, Andrew T. wrote:
>
> > Mark V. 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
Alexandru E. Ungur (Guest)
on 2006-04-13 02:18
(Received via mailing list)
>>> sender: "removed_email_address@domain.invalid" date: "Thu, Apr 13, 2006 at 06:20:10AM 
+0900" <<<EOQ
> On Thu, 13 Apr 2006, Andrew T. wrote:
>
> >Mark V. 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
unknown (Guest)
on 2006-04-13 03: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
unknown (Guest)
on 2006-04-19 18: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.
Stephan M. (Guest)
on 2006-04-19 18:56
(Received via mailing list)
* Mark V. <removed_email_address@domain.invalid> [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.
Stephan M. (Guest)
on 2006-04-19 19:30
(Received via mailing list)
* removed_email_address@domain.invalid <removed_email_address@domain.invalid> 
[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.
Mark S. (Guest)
on 2006-04-25 13:30
(Received via mailing list)
On Wednesday 12 April 2006 19:38, Andrew T. 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
Mark G. (Guest)
on 2006-04-26 18:29
(Received via mailing list)
Mark S. 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
Andrew T. (Guest)
on 2006-04-26 20:10
Mark G. 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
Mark G. (Guest)
on 2006-04-27 00:50
(Received via mailing list)
Andrew T. 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.