tags:

views:

2947

answers:

5

Hi,

I recently switched to Emacs and still finding my way through it. I code in C++ and was wondering what tools out there extend Emacs to support code browsing (finding a symbol etc), refactoring and code completion. I have heard of:

  • cedet
  • etags
  • cscope

But I'm so confused about what I need. Some places say that cedet provides all of the functionality but other places say that I need to invoke etags for cedet to work properly.

Can someone clear this up for me? Do I need all of these tools?

+2  A: 

Cscope is very good as "find symbol" usage tool. It is very fast.
Etags will show you your class hierarchy and will help you to find method definition/declaration.

So these two tools are must have and they are independent.

Cedet. It is kind of replacement of these two tools above with additional features. So your choice either cscope/etags or cedet.

Mykola Golubyev
+14  A: 

May you'll find useful my article about Cedet. Cedet has support for etags, gtags, cscope and other tools.

But refactoring part is missing. May you'll need to look to Xrefactory tool (but it isn't free)

Alex Ott
I have re-config the cedet for my emacs acorrding to you guide and config files. Oh, greate. Thank you very much.
Cook Schelling
+1  A: 

Personally, I don't like cedet. It makes Emacs take an hour to load. The auto-complete feature has never worked quite right with me. I don't need its project-management nor its UML features. The only thing I miss about it is the Emacs Code Browser, which is very useful but requires cedet

I would advice you to just use cscope and etags and see how you like them. You can install cedet later once you're more familiar with emacs.

bigmonachus
You can use only needed parts of Cedet. Name completion works fine in latest versions of Cedet (but may be you'll need to perform some customization)
Alex Ott
A: 

gtags (http://www.gnu.org/software/global/) is also available and perhaps simpler to use.

A: 

For refactoring, I started using emacs exclusively for this and related tasks after I read this article by emacs hacker Xah Lee.

For autocompletion, see this SO post. Personally, I've found yasnippet very helpful throughout the years.

Steen