[arch-projects] New small project proposition

Dusty Phillips buchuki at gmail.com
Fri Apr 8 18:39:05 EDT 2005


I have no idea in vim. Context-sensitive completion is the one thing I
miss in JEdit from Netbeans too.

Under JEdit, there's an option to complete a word based on all other
words in the currently open file. I'm certain vim has this already too
-- is that what Ctrl-n and Ctrl-p do by default?

However, it would be nice to have something context sensitive. So if I have:

String myStr;
String clip = myStr.su

it will automatically complete to myStr.subString(

For that to work, it has to be language aware, both for syntax, and
for available libraries. Trying to get that to work across all
languages would be really difficult... not impossible.

Is this what you're looking at too?

Dusty

On Apr 8, 2005 4:27 PM, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> So, I always screw myself up when using vim - I work professionally
> using VS.NET, and there's alot of features that are real nice... most
> can be worked into vim somehow (for instance, the way the HOME key
> will toggle between column 0 and the first non-whitespace char).  The
> only one I miss is the context-sensitive completion of VS.NET...
> 
> Now I'm not talking about a little popup window with all the
> accessability and things like that... I'm just looking for <C-N> and
> <C-P> to complete within the context of the class/struct/union...
> 
> I've looked a bit into some of the plugins that vim has right now and
> most of them suck.  There are 3 though, that I cannot test yet... 2
> are ruby-based, another perl-based... stupid win32 and their paths and
> grrr... "cannot load library perl58.dll, aborting" I give up...
> 
> Anyway, what I'd like to do is create a little stand alone app that
> could very easilly be integrated into vim, or anything else... seeing
> as I like to think from the outside inward, here's the interface I
> have in my head:
> 
> $ findsyms "XCreateSimpleW" /usr/include/X11/Xlib.h
> XCreateSimpleWindow
> $ findsyms --signature "signal5::conn" /usr/include/sigc++
> void sigc::signal5::connect(const slot5&)
> $ cat "my_file.c" | findsyms --signature "foo"
> bool foo(int,int)
> $ findsyms "java.lang.String" /path/to/java/jar
> ...list all public String members...
> # from vim:
> :!findsyms <cword> % "well, not exactly... I'd need to get the type of
> a variable in the case of OO
> 
> simple: scan file + included files for matching definitions
> 
> basically, if finds matching patterns... not too hard... ideally, I'd
> go really generic and create language files to describe what each
> scope looks like, what an include file looks like, and how to
> determine if something is visible at that scope of not
> 
> c++ would be rough when you get into templates (that sigc:: one would
> fail unless it ignores templates), but c would be easy, as would
> things like python... and maybe perl
> 
> I want to be able to use this in vim somehow as a dict file...
> 
> Now I may be way off with this, and there may be a simple way to do it
> *within* vim... but I don't know...
> 
> Anyone have any opinions? Feel free to debase me or whatever... or
> suggest a language that would do this easiest... just really thinking
> outloud today
> 
> _______________________________________________
> arch-projects mailing list
> arch-projects at archlinux.org
> http://archlinux.org/mailman/listinfo/arch-projects
>




More information about the arch-projects mailing list