Question

I'm looking for a good article on using emacs as C/C++ IDE.

Something like Steve Yegge's "Effective emacs".

Was it helpful?

Solution

No specific article, really, but I've found EmacsWiki to be full of useful information. Consider checking out these entries:

  • CPlusPlus as a starting point for many C++-related articles, and
  • CppTemplate to define a template that can give you a good skeleton when you start new files

OTHER TIPS

I've recently stumbled upon this article which is quite good.

EDIT: Yep the link is no longer valid. It seems like they've changed their url recently and it doesn't redirect properly. Hopefully it will be back soon. Anyway the article was called "Benjamin Rutt's Emacs C development tips". I managed to find a copy here.

I'm planning to write such article in near future, but you can now take my configuration of Cedet + Emacs, that helps me to effectively edit C++ sources. If you'll have questions, you could ask me directly

Be aware that Emacs' C++ mode is based on only regular expressions, not a grammar. Hence, the syntax highlighting is not based strictly on the syntax of the language itself, but rather is largely based on commonplace formatting. The Emacs syntax highlighting of C++ often makes mistakes.

The problem is not limited to syntax hightlighting. The same defective design applies to the automatic formatting. All this said, I have been using only Emacs for all of my editing of C++ source code for over 20 years, since the cfront days. (I usually turn off electric key bindings, because of Emacs' defective regex-based design. Regexes do not have enough expressive power to describe the C++ syntax accurately.

I recommend ggtags and irony-mode. Other then that you may want to use helm-ag to search ("grep") for strings in your codebase.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top