sponsor Vim development Vim logo Vim Book Ad

OO code completion : Gives list of methods for the identifier under the cursor for OO languages.

 script karma  Rating 50/19, Downloaded by 3085    Comments, bugs, improvements  Vim wiki

created by
emmanuel touzery
 
script type
utility
 
description
NOTE:as of  june 17, 2003, this script is no more developped due to lack of time/lack of certain features i miss in ctags. i'll take patches to improve it however, and i have a much more ambitious version (with limited lex/yacc parsing in ruby via racc) on my hard-drive, any contribution is appreciated.
i don't consider it dead, but in hibernation (especially for the ctags features).

REQUIRES RUBY.
This plugin will provide functions to get "code completion" in vim.
it will list all methods for the identifier under the cursor if you call :PossibleFunctions.
when you start typing a method, it will tell you which methods of the relevant class start by what you typed if you call :PossibleCompletions.
it works by using gd and ctags to get the class of the relevant object, and ctags to get the list of functions for this object.
NOTE: this includes inheritance! functions of the class and the parent classes are listed.
normally also only public member functions are listed.
This plugin requires tags to be generated with certain parameters (it
needs information about inheritance and access of members).
You can use the GenerateTags command to generate tags for the current directory.

For now this plugin only supports Java and C++. It should only support OO languages, though I guess it could be used for C structs maybe.
 
install details
For now I'm not providing any key shortcuts. (Ideas?).
Source this plugin or copy it to your ~/.vim/plugins, and you have access to the following commands:
:GenerateTags
:PossibleFunctions
:PossibleCompletions
:TypeUnderCursor

please check the documentation in the plugin file itself.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
oocompletion.vim 0.4 2002-12-08 6.0 emmanuel touzery * new developer: Luc Hermitte
* support for the 'tags' variable to know where to look for tag files (if you don't have this variable there is a good default)
* vimL cleanups (no more marks, cleaner code, ...)
* some speedups
oocompletion.vim 0.3 2002-11-26 6.0 emmanuel touzery * multiple inheritance
* java interfaces
oocompletion.vim 0.2 2002-11-26 6.0 emmanuel touzery * Fixes my speed problems with kword (keeps a cache of classes that are not found in the tags file). Now it's instaneous for even very big classes.
* If you use the default command to generate tags, now it's recursive so that not only files from the current directory are parsed by ctags.

any feedback welcome!
oocompletion.vim 0.1 2002-11-26 6.0 emmanuel touzery Initial upload
ip used for rating: 54.82.66.236

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo