Emacs code completion for C/C++?

CEDET is just great, certainly needs some time at the beginning but worth it though.


You could also use an autocomplete plugin for clang as long as your source compiles with it. links:

  • https://github.com/Golevka/emacs-clang-complete-async
  • https://github.com/brianjcj/auto-complete-clang
  • https://github.com/mikeandmore/auto-complete-clang or
  • the mode which is included in the clang-source: http://llvm.org/svn/llvm-project/cfe/trunk/utils/clang-completion-mode.el

GCCSense

From the author of Auto Complete Mode. It uses gcc to find candidates for code completion as the name suggests.

emacs gccsense screenshot


You can try company-mode. It's a multi-backend in-buffer completion mechanism.
Watch the screencast to get an idea of how it works.

Some of the back-ends are:

  • CEDET Semantic
  • dabbrev
  • XCode
  • PySmell
  • Ropemacs
  • GNU Global

And it's also available via ELPA.