views:

3896

answers:

7

How Do I Get Eclipse Sytle Function Completions in Emacs for C, C++ and JAVA? I love the power of the Emacs text editor but the lack of an "intellisense" feature leaves me using Eclipse.

+1  A: 

Have you tried the emacs plugin for eclipse?

http://people.csail.mit.edu/adonovan/hacks/eclipse-emacs.html

cynicalman
+1  A: 
dmckee
+3  A: 

I can only answer your question as one who has not used Eclipse much. But! What if there was a really nice fast heuristic analysis of everything you typed or looked at in your emacs buffers, and you got smart completion over all that everywhere, not just in code?

M-x load-library completion
M-x global-set-key C-RET complete RET
jfm3
+9  A: 

M-/ is a quick and dirty autocomplete based on the contents of your current buffer. It won't give you everything you get in Eclipse but is surprisingly powerful.

Dave Webb
Not to forget that binding M-/ to 'hippie-expand provides even more completion possibilities.
Trey Jackson
+6  A: 

When I was doing java development I used to use the:

Java Development Environment for Emacs (JDEE)

The JDEE will provide method name completion when you explicitly invoke a jdee provided function. It has a keyboard binding for this functionality in the jdee-mode.

rwc9u
+4  A: 

The CEDET package provides completion for C/C++ & Java (and for some other languages). To initial customization you can take my config that i use to work with C++ projects

Alex Ott
+2  A: 

Right now, I'm using Auto Complete for Emacs. As a current Visual Studio and ex-Eclipse user, I can say that it rivals both applications quite well. It's still not as good as Microsoft's IntelliSense for C#, but some would say that C++ is notoriously difficult to parse.

It leverages the power of (I believe) the Semantic package from Cedet, and I find it feels nicer to use when compared to Smart Complete. It completes C++ members, local variables, etc. It's pretty good. However, it falls down on not being able to complete overloaded methods (it only shows the function once with no parameters, but thats a limitation of Cedet I believe), and other various things. It may improve in future though!

By the way, I could be wrong here, but I think you need an EDE project set up for the class member completion to work (just like you would normally with Semantic). I've only ever used it while having an EDE project, so I assume this is true.

nbolton