I’ve used clang_complete plugin to autocomplete my C code for five months… until YouCompleteMe caught my eye. And now I feel that would stay with it indefinitely.
YouCompleteMe (YCM) is a fast, as-you-type code completion engine for Vim. It combines output from several sources: an identifier-based engine that works with every programming language, a semantic, Clang-based engine that provides native semantic code completion for C/C++/Objective-C/Objective-C++ (from now on referred to as “the C-family languages”), a Jedi-based completion engine for Python, an OmniSharp-based completion engine for C# and an omnifunc-based completer that uses data from Vim’s omnicomplete system to provide semantic completions for many other languages (Ruby, PHP etc.). And prioritize them with a complex algorithm.
Note that it’s not necessary to press any keyboard shortcut to invoke a completion menu.
The second advantage of YCM is that it has a client-server architecture. Vim part of YCM is just a thin client that talks to ycmd server. The server is automatically started and stopped as you start and stop Vim.
Thus, YCM doesn’t make Vim more sluggish or somehow slow down text editing.
The third newsworthy thing is diagnostic display feature. (the little red X that shows up the left gutter) if you are editing a C-family file. As Clang compiles your file and detects warnings and errors, they will be presented in various ways. You don’t need to save your file or press any keyboard shortcut to trigger this, it “just happens” in the background.
YCM also provides semantic go-to-definition/declaration commands for C-family languages and Python.
For more detailed feature overview, visit an YCM home page.