RE: autocomplete - listing methods of Java class

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

RE: autocomplete - listing methods of Java class

Bouckaert, Hugo
Hi

Yes, similarly, a "balloon" which lists methods for a particular Java
class is something that would be a fantastic addition to vim. For Java I
remember NetBeans does this but vim is so much better in other respects.
I am thinking of something which does this:

Point p = new Point();
p.
...and when I tab forward from the . (dot) after p, a "balloon" pops up
with all the methods of Class Point:
----------------------------------
| getLocation()                   |
| setLocation(double x, double y) |
| setLocation (Point p)           |
| toString()                      |
----------------------------------

When you select one of them from the balloon list, the method is
inserted in the text e.g. if you choose setLocation()you end up with

p.setLocation();

If vim could do this, that would be absolutely fantastic. Not easy to
achieve though, I imagine.

Anybody knows of a plugin that does something like that?

Thanks

Hugo


-----Original Message-----
From: Aaron Griffin [mailto:[hidden email]]
Sent: Thursday, 1 September 2005 6:02 AM
To: vim mailing list
Subject: Re: autocomplete

On 8/31/05, Charles E. Campbell, Jr. <[hidden email]> wrote:
> Sean Hubbell wrote:
>
> >  I use vim daily to edit and modify source code. I realize that vim
> > is "just" an editor, but I was wondering if someone has possibly
> > created a plugin that provides a balloon prototype tool tip. For
> > example, if I have the following defined in a header file
(<filename>.h:

> >
> > void ThisRoutine (long first, long second, double third);
> >
> > and I was adding a function in the source file (<filename>.cpp):
> >
> > I would start typing:
> >
> > ThisRou
> >
> > and get a balloon that told me what the parameter list is.
>
>
> My flist program,  available at
> http://mysite.verizon.net/astronaut/src/index.html , analyzes C source

> files (and C++ too, although it doesn't handle templates) and
> generates "hints" files.  I have a map...
>
>   nmap <silent> <F4>  :so $HDR/hints<bar>echomsg "hints loaded"<CR>
>
> which I use to source (load) the hints file.  Then, when I type
> myfunction(  a copy of the prototype shows up as an echoed message for

> the "myfunction" function.  To generate hints with flist:
>
>   flist -h *.c ...
>
> or use recursive descent down a directory tree:
>
>   flist -rh /path/to/some/directory
>
> You'll need to compile flist yourself, though.
>
> Regards,
> Chip Campbell

Sounds kinda cool.  Similar to what icomplete does, except icomplete
will parse c++ and understand scope fairly well.  Another thing I like
about icomplete is that it parses through headers as well and
understands types.

    #include <string>
    std::string s;
    s.
when you type the "." a previewwindow displays listing all the member
functions of "std::string"
Reply | Threaded
Open this post in threaded view
|

RE: autocomplete - listing methods of Java class

David Fishburn
It depends on what platform you are on.

For Win32 there is the Intellisense plugin which does popup completion for
many languages, including:
Java, XML, HTML, C++, JSP, SQL, C#


See:
http://www.vim.org/scripts/script.php?script_id=747


Dave

 

> -----Original Message-----
> From: Bouckaert, Hugo [mailto:[hidden email]]
> Sent: Monday, September 19, 2005 4:26 AM
> To: Aaron Griffin; vim mailing list
> Subject: RE: autocomplete - listing methods of Java class
>
> Hi
>
> Yes, similarly, a "balloon" which lists methods for a
> particular Java class is something that would be a fantastic
> addition to vim. For Java I remember NetBeans does this but
> vim is so much better in other respects.
> I am thinking of something which does this:
>
> Point p = new Point();
> p.
> ...and when I tab forward from the . (dot) after p, a
> "balloon" pops up with all the methods of Class Point:
> ----------------------------------
> | getLocation()                   |
> | setLocation(double x, double y) |
> | setLocation (Point p)           |
> | toString()                      |
> ----------------------------------
>
> When you select one of them from the balloon list, the method
> is inserted in the text e.g. if you choose setLocation()you
> end up with
>
> p.setLocation();
>
> If vim could do this, that would be absolutely fantastic. Not
> easy to achieve though, I imagine.
>
> Anybody knows of a plugin that does something like that?
>
> Thanks
>
> Hugo
>
>
> -----Original Message-----
> From: Aaron Griffin [mailto:[hidden email]]
> Sent: Thursday, 1 September 2005 6:02 AM
> To: vim mailing list
> Subject: Re: autocomplete
>
> On 8/31/05, Charles E. Campbell, Jr.
> <[hidden email]> wrote:
> > Sean Hubbell wrote:
> >
> > >  I use vim daily to edit and modify source code. I
> realize that vim
> > > is "just" an editor, but I was wondering if someone has possibly
> > > created a plugin that provides a balloon prototype tool tip. For
> > > example, if I have the following defined in a header file
> (<filename>.h:
> > >
> > > void ThisRoutine (long first, long second, double third);
> > >
> > > and I was adding a function in the source file (<filename>.cpp):
> > >
> > > I would start typing:
> > >
> > > ThisRou
> > >
> > > and get a balloon that told me what the parameter list is.
> >
> >
> > My flist program,  available at
> > http://mysite.verizon.net/astronaut/src/index.html ,
> analyzes C source
>
> > files (and C++ too, although it doesn't handle templates) and
> > generates "hints" files.  I have a map...
> >
> >   nmap <silent> <F4>  :so $HDR/hints<bar>echomsg "hints loaded"<CR>
> >
> > which I use to source (load) the hints file.  Then, when I type
> > myfunction(  a copy of the prototype shows up as an echoed
> message for
>
> > the "myfunction" function.  To generate hints with flist:
> >
> >   flist -h *.c ...
> >
> > or use recursive descent down a directory tree:
> >
> >   flist -rh /path/to/some/directory
> >
> > You'll need to compile flist yourself, though.
> >
> > Regards,
> > Chip Campbell
>
> Sounds kinda cool.  Similar to what icomplete does, except
> icomplete will parse c++ and understand scope fairly well.  
> Another thing I like about icomplete is that it parses
> through headers as well and understands types.
>
>     #include <string>
>     std::string s;
>     s.
> when you type the "." a previewwindow displays listing all
> the member functions of "std::string"
>
>

Reply | Threaded
Open this post in threaded view
|

RE: autocomplete - listing methods of Java class

Hans-5
In reply to this post by Bouckaert, Hugo
I've tried Intellisense. However it does take some long time for the popup
window to come up even when I do the following in vimrc_example.vim:
let b:dochelpdelay=100

Anything wrong?

>It depends on what platform you are on.
>
>For Win32 there is the Intellisense plugin which does popup completion for
>many languages, including:
>Java, XML, HTML, C++, JSP, SQL, C#
>
>
>See:
>http://www.vim.org/scripts/script.php?script_id=747
>
>
>Dave
>
>
>
>> -----Original Message-----
>> From: Bouckaert, Hugo [mailto:[hidden email]]
>> Sent: Monday, September 19, 2005 4:26 AM
>> To: Aaron Griffin; vim mailing list
>> Subject: RE: autocomplete - listing methods of Java class
>>
>> Hi
>>
>> Yes, similarly, a "balloon" which lists methods for a
>> particular Java class is something that would be a fantastic
>> addition to vim. For Java I remember NetBeans does this but
>> vim is so much better in other respects.
>> I am thinking of something which does this:
>>
>> Point p = new Point();
>> p.
>> ...and when I tab forward from the . (dot) after p, a
>> "balloon" pops up with all the methods of Class Point:
>> ----------------------------------
>> | getLocation()                   |
>> | setLocation(double x, double y) |
>> | setLocation (Point p)           |
>> | toString()                      |
>> ----------------------------------
>>
>> When you select one of them from the balloon list, the method
>> is inserted in the text e.g. if you choose setLocation()you
>> end up with
>>
>> p.setLocation();
>>
>> If vim could do this, that would be absolutely fantastic. Not
>> easy to achieve though, I imagine.
>>
>> Anybody knows of a plugin that does something like that?
>>
>> Thanks
>>
>> Hugo
>>
>>
>> -----Original Message-----
>> From: Aaron Griffin [mailto:[hidden email]]
>> Sent: Thursday, 1 September 2005 6:02 AM
>> To: vim mailing list
>> Subject: Re: autocomplete
>>
>> On 8/31/05, Charles E. Campbell, Jr.
>> <[hidden email]> wrote:
>> > Sean Hubbell wrote:
>> >
>> > >  I use vim daily to edit and modify source code. I
>> realize that vim
>> > > is "just" an editor, but I was wondering if someone has possibly
>> > > created a plugin that provides a balloon prototype tool tip. For
>> > > example, if I have the following defined in a header file
>> (<filename>.h:
>> > >
>> > > void ThisRoutine (long first, long second, double third);
>> > >
>> > > and I was adding a function in the source file (<filename>.cpp):
>> > >
>> > > I would start typing:
>> > >
>> > > ThisRou
>> > >
>> > > and get a balloon that told me what the parameter list is.
>> >
>> >
>> > My flist program,  available at
>> > http://mysite.verizon.net/astronaut/src/index.html ,
>> analyzes C source
>>
>> > files (and C++ too, although it doesn't handle templates) and
>> > generates "hints" files.  I have a map...
>> >
>> >   nmap <silent> <F4>  :so $HDR/hints<bar>echomsg "hints loaded"<CR>
>> >
>> > which I use to source (load) the hints file.  Then, when I type
>> > myfunction(  a copy of the prototype shows up as an echoed
>> message for
>>
>> > the "myfunction" function.  To generate hints with flist:
>> >
>> >   flist -h *.c ...
>> >
>> > or use recursive descent down a directory tree:
>> >
>> >   flist -rh /path/to/some/directory
>> >
>> > You'll need to compile flist yourself, though.
>> >
>> > Regards,
>> > Chip Campbell
>>
>> Sounds kinda cool.  Similar to what icomplete does, except
>> icomplete will parse c++ and understand scope fairly well.  
>> Another thing I like about icomplete is that it parses
>> through headers as well and understands types.
>>
>>     #include <string>
>>     std::string s;
>>     s.
>> when you type the "." a previewwindow displays listing all
>> the member functions of "std::string"
>>


Reply | Threaded
Open this post in threaded view
|

RE: autocomplete - listing methods of Java class

David Fishburn

When the method list pops up, you can navigate to the one you want (up and
down arrow keys) then hit the right arrow key to bring up the docs
immediately.

Dave
 

> -----Original Message-----
> From: Yorkwar [mailto:[hidden email]]
> Sent: Tuesday, September 20, 2005 9:51 PM
> To: David Fishburn; 'Bouckaert, Hugo'; 'vim mailing list'
> Subject: RE: autocomplete - listing methods of Java class
>
> I've tried Intellisense. However it does take some long time
> for the popup window to come up even when I do the following
> in vimrc_example.vim:
> let b:dochelpdelay=100
>
> Anything wrong?
>
> >It depends on what platform you are on.
> >
> >For Win32 there is the Intellisense plugin which does popup
> completion
> >for many languages, including:
> >Java, XML, HTML, C++, JSP, SQL, C#
> >
> >
> >See:
> >http://www.vim.org/scripts/script.php?script_id=747
> >
> >
> >Dave
> >
> >
> >
> >> -----Original Message-----
> >> From: Bouckaert, Hugo [mailto:[hidden email]]
> >> Sent: Monday, September 19, 2005 4:26 AM
> >> To: Aaron Griffin; vim mailing list
> >> Subject: RE: autocomplete - listing methods of Java class
> >>
> >> Hi
> >>
> >> Yes, similarly, a "balloon" which lists methods for a
> particular Java
> >> class is something that would be a fantastic addition to vim. For
> >> Java I remember NetBeans does this but vim is so much
> better in other
> >> respects.
> >> I am thinking of something which does this:
> >>
> >> Point p = new Point();
> >> p.
> >> ...and when I tab forward from the . (dot) after p, a
> "balloon" pops
> >> up with all the methods of Class Point:
> >> ----------------------------------
> >> | getLocation()                   |
> >> | setLocation(double x, double y) |
> >> | setLocation (Point p)           |
> >> | toString()                      |
> >> ----------------------------------
> >>
> >> When you select one of them from the balloon list, the method is
> >> inserted in the text e.g. if you choose setLocation()you
> end up with
> >>
> >> p.setLocation();
> >>
> >> If vim could do this, that would be absolutely fantastic.
> Not easy to
> >> achieve though, I imagine.
> >>
> >> Anybody knows of a plugin that does something like that?
> >>
> >> Thanks
> >>
> >> Hugo
> >>
> >>
> >> -----Original Message-----
> >> From: Aaron Griffin [mailto:[hidden email]]
> >> Sent: Thursday, 1 September 2005 6:02 AM
> >> To: vim mailing list
> >> Subject: Re: autocomplete
> >>
> >> On 8/31/05, Charles E. Campbell, Jr.
> >> <[hidden email]> wrote:
> >> > Sean Hubbell wrote:
> >> >
> >> > >  I use vim daily to edit and modify source code. I
> >> realize that vim
> >> > > is "just" an editor, but I was wondering if someone
> has possibly
> >> > > created a plugin that provides a balloon prototype
> tool tip. For
> >> > > example, if I have the following defined in a header file
> >> (<filename>.h:
> >> > >
> >> > > void ThisRoutine (long first, long second, double third);
> >> > >
> >> > > and I was adding a function in the source file
> (<filename>.cpp):
> >> > >
> >> > > I would start typing:
> >> > >
> >> > > ThisRou
> >> > >
> >> > > and get a balloon that told me what the parameter list is.
> >> >
> >> >
> >> > My flist program,  available at
> >> > http://mysite.verizon.net/astronaut/src/index.html ,
> >> analyzes C source
> >>
> >> > files (and C++ too, although it doesn't handle templates) and
> >> > generates "hints" files.  I have a map...
> >> >
> >> >   nmap <silent> <F4>  :so $HDR/hints<bar>echomsg "hints
> loaded"<CR>
> >> >
> >> > which I use to source (load) the hints file.  Then, when I type
> >> > myfunction(  a copy of the prototype shows up as an echoed
> >> message for
> >>
> >> > the "myfunction" function.  To generate hints with flist:
> >> >
> >> >   flist -h *.c ...
> >> >
> >> > or use recursive descent down a directory tree:
> >> >
> >> >   flist -rh /path/to/some/directory
> >> >
> >> > You'll need to compile flist yourself, though.
> >> >
> >> > Regards,
> >> > Chip Campbell
> >>
> >> Sounds kinda cool.  Similar to what icomplete does, except
> icomplete
> >> will parse c++ and understand scope fairly well.
> >> Another thing I like about icomplete is that it parses through
> >> headers as well and understands types.
> >>
> >>     #include <string>
> >>     std::string s;
> >>     s.
> >> when you type the "." a previewwindow displays listing all
> the member
> >> functions of "std::string"
> >>
>
>
>