Konrad Rudolph
Konrad Rudolph

Reputation: 546043

Autocompletion in Vim

In a nutshell, I'm searching for a working autocompletion feature for the Vim editor. I've argued before that Vim completely replaces an IDE under Linux and while that's certainly true, it lacks one important feature: autocompletion.

I know about Ctrl+N, Exuberant Ctags integration, Taglist, cppcomplete and OmniCppComplete. Alas, none of these fits my description of “working autocompletion:”

I'm aware of the fact that not even modern, full-blown IDEs offer good C++ code completion. That's why I've accepted Vim's lack in this area until now. But I think a fundamental level of code completion isn't too much to ask, and is in fact required for productive usage. So I'm searching for something that can accomplish at least the following things.

Did I forget anything? Feel free to update.

I'm comfortable with quite a lot of configuration and/or tinkering but I don't want to program a solution from scratch, and I'm not good at debugging Vim scripts.

A final note, I'd really like something similar for Java and C# but I guess that's too much to hope for: ctags only parses code files and both Java and C# have huge, precompiled frameworks that would need to be indexed. Unfortunately, developing .NET without an IDE is even more of a PITA than C++.

Upvotes: 266

Views: 131466

Answers (7)

Valloric
Valloric

Reputation: 2983

Try YouCompleteMe. It uses Clang through the libclang interface, offering semantic C/C++/Objective-C completion. It's much like clang_complete, but substantially faster and with fuzzy-matching.

In addition to the above, YCM also provides semantic completion for C#, Python, Go, TypeScript etc. It also provides non-semantic, identifier-based completion for languages for which it doesn't have semantic support.

Upvotes: 178

Johan
Johan

Reputation: 20773

Did someone mention code_complete?

But you did not like ctags, so this is probably not what you are looking for...

Upvotes: 1

romainl
romainl

Reputation: 196826

I'm a bit late to the party but autocomplpop might be helpful.

Upvotes: 3

Konrad Rudolph
Konrad Rudolph

Reputation: 546043

There’s also clang_complete which uses the clang compiler to provide code completion for C++ projects. There’s another question with troubleshooting hints for this plugin.

The plugin seems to work fairly well as long as the project compiles, but is prohibitively slow for large projects (since it attempts a full compilation to generate the tags list).

Upvotes: 38

Konrad Rudolph
Konrad Rudolph

Reputation: 546043

I've just found the project Eclim linked in another question. This looks quite promising, at least for Java integration.

Upvotes: 6

Ric Tokyo
Ric Tokyo

Reputation: 6585

as per requested, here is the comment I gave earlier:

have a look at this:

this link should help you if you want to use monodevelop on a MacOSX

Good luck and happy coding.

Upvotes: 6

Ric Tokyo
Ric Tokyo

Reputation: 6585

is what you are looking for something like intellisense?

insevim seems to address the issue.

link to screenshots here

Upvotes: 2

Related Questions