rubycomplete update

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

rubycomplete update

Mark Guzman
I've committed my changes adding support for completion of classes
defined in the current buffer.
The commit also adds the work around for the cWORD problem Doug found.
I'm going to send an email to the rails/ruby/vim lists about it and
notifying them that they should check vim-ruby. The next stop for
rubycomplete is module support and rails integration.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Nikolai Weibull-11
On 4/16/06, Mark Guzman <[hidden email]> wrote:
> The next stop for rubycomplete is module support
> and rails integration.

What exactly does "rails integration" mean?

  nikolai

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Nikolai Weibull-11
In reply to this post by Mark Guzman
On 4/16/06, Mark Guzman <[hidden email]> wrote:
> The commit also adds the work around for the cWORD problem Doug found.

Actually, this isn't the right solution I think.  The whole cWORD
problem happens whenever a symbol is preceded by whitespace, not only
when at the beginning of a line.  One solution that works is calling
VIM::command('normal! h') if the string is empty and then expanding.
That way the cursor will be over the dot in ":x." and it will expand
to the correct string.  I really think that this should be fixed
inside Vim instead, but Bram can't replicate our issue, so perhaps
there something more to it than a simple bug in expand().

  nikolai

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
Nikolai Weibull wrote:

> Actually, this isn't the right solution I think.  The whole cWORD
> problem happens whenever a symbol is preceded by whitespace, not only
> when at the beginning of a line.  One solution that works is calling
> VIM::command('normal! h') if the string is empty and then expanding.
> That way the cursor will be over the dot in ":x." and it will expand
> to the correct string.  I really think that this should be fixed
> inside Vim instead, but Bram can't replicate our issue, so perhaps
> there something more to it than a simple bug in expand().
>
>   nikolai
>  
cWORD worked at the begining. I've added code to left trim the string
and check if its empty at that point. If cWORD is still showing the same
problem then the ruby code will grab the whole current line and attempt
to operate on that instead. Once there is a solution to the cWORD bug,
the code will cease to operate. It does indeed work, as I've used it
while testing the cWORD bug and the in-buffer class completion stuff. I
may take a crack at fixing the cWORD issue in vim, once i grab the
latest snapshot.
  --mark


--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
In reply to this post by Nikolai Weibull-11
Nikolai Weibull wrote:
> What exactly does "rails integration" mean?
>  
I'm going to have vim check if its operating on a file that is part of a
rails project (through the detection of default files in paths). If so
it will attempt to load an environment similar to that of
script/console, allowing for completion of activerecord classes and
class variables in eruby templates (hopefully).
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Doug Kearns
In reply to this post by Nikolai Weibull-11
On Sun, Apr 16, 2006 at 11:52:07PM +0200, Nikolai Weibull wrote:

> On 4/16/06, Mark Guzman <[hidden email]> wrote:
> > The commit also adds the work around for the cWORD problem Doug found.
>
> Actually, this isn't the right solution I think.  The whole cWORD
> problem happens whenever a symbol is preceded by whitespace, not only
> when at the beginning of a line.  One solution that works is calling
> VIM::command('normal! h') if the string is empty and then expanding.
> That way the cursor will be over the dot in ":x." and it will expand
> to the correct string.  I really think that this should be fixed
> inside Vim instead, but Bram can't replicate our issue, so perhaps
> there something more to it than a simple bug in expand().

He can now and is fixing it. Apparently it requires 'encoding' to be set
to "utf-8".

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
In reply to this post by Mark Guzman
On my long drive home from long island (traffic sucked), I thought of
two issues that I'd like to tackle. One issue is blocking my notifying
anyone about the changes. Class dependencies within a single file would
break the in-buffer completion. In addition the current function does
not handle classes that are inheriting from a parent.
The other issue comes from completion within a class definition. Say you
are working on class Foo, method Bar and want to complete a member of
the current class.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
In reply to this post by Nikolai Weibull-11
Nikolai Weibull wrote:
> Actually, this isn't the right solution I think.  The whole cWORD
> problem happens whenever a symbol is preceded by whitespace, not only
> when at the beginning of a line.  One solution that works is calling
> VIM::command('normal! h') if the string is empty and then expanding.
> That way the cursor will be over the dot in ":x." and it will expand
> to the correct string.  I really think that this should be fixed
> inside Vim instead, but Bram can't replicate our issue, so perhaps
> there something more to it than a simple bug in expand().
>  
I thought a little more about the problem, and I still don't want to
move the cursor. I believe using the ruby-side buffer stuff we can get
the current cursor position so we could provide the same functionality
that cWORD was providing.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
In reply to this post by Doug Kearns
Doug Kearns wrote:
> He can now and is fixing it. Apparently it requires 'encoding' to be set
> to "utf-8".
>  
i18n bites me in the bum again. Well I guess I'll be taking out my
little hack.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Doug Kearns
In reply to this post by Mark Guzman
On Mon, Apr 17, 2006 at 09:40:36AM -0400, Mark Guzman wrote:
> On my long drive home from long island (traffic sucked), I thought of
> two issues that I'd like to tackle. One issue is blocking my notifying
> anyone about the changes.

I'm not sure I understand what you mean here?

Thanks,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Mark Guzman
Doug Kearns wrote:

> On Mon, Apr 17, 2006 at 09:40:36AM -0400, Mark Guzman wrote:
>  
>> On my long drive home from long island (traffic sucked), I thought of
>> two issues that I'd like to tackle. One issue is blocking my notifying
>> anyone about the changes.
>>    
>
> I'm not sure I understand what you mean here?
>
> Thanks,
> Doug
>  
I was going to send an announcement message to the ruby lists, listing
the new features, pointing them a vim-ruby, and such. I didn't like the
idea of notifying people without cleaning up those issues. On the bright
side, I've checked in a version that will load inheritance dependencies
and modules. Now I just need to test that a bit more and figure out how
I'd like to handle completing things while working inside an object
definition. I'm thinking I can use the same regex's that are picking up
the class definitions, if the current cursor pos falls between the start
and end then we know what "this" would be referring to.
  --mark

--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: rubycomplete update

Doug Kearns
On Wed, Apr 19, 2006 at 09:11:34AM -0400, Mark Guzman wrote:

<snip>
 
> I was going to send an announcement message to the ruby lists, listing
> the new features, pointing them a vim-ruby, and such. I didn't like the
> idea of notifying people without cleaning up those issues.

Thanks, I was misreading it as you felt you couldn't notify the wider
world of any changes because of our release process. :-)

Would it help if we made a release in an effort to encourage people to
play around with the completion script and make contributions?

<snip>

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel