Vim auto completion

Hi,

I have been watching the vim/clang autocompletion in utils/vim/vimrc for a while. What is the status of this work? The last information I got is, that there where still some patches missing, but this was before the clang-2.8.
Any updates? Is it supposed to work with clang-2.8?

Thanks

Tobi

It requires a clang patch, which I hadn't submitted yet. I've sent out the
requisite clang patch to cfe-commits now (support auto-completion on stdin).

There's room for improvement in the vimrc file, in particular in the way
overloaded functions are handled, but it's pretty usable already.

Dan

It works great and is reasonable fast.

Thanks a lot

Tobi

The clang patches are now applied, so vim auto completion now works mostly
out-of-the-box -- just build clang, set up your PATH for clang and clang++,
and copy utils/vim/vimrc to ~/.vimrc (or symlink, or do your own thing).

To configure the clang command-line, look for the g: configuration
variables in the vimrc file.

I'm open to suggestions about the handling of function parameters. One
option would be to emit something like

   foo(/*int x*/, /*int y*/)

to show the types of the arguments to be filled in. Right now this information
is just in the info box at the top.

Dan

Dan Gohman <gohman <at> apple.com> writes:

The clang patches are now applied, so vim auto completion now works mostly
out-of-the-box -- just build clang, set up your PATH for clang and clang++,
and copy utils/vim/vimrc to ~/.vimrc (or symlink, or do your own thing).

To configure the clang command-line, look for the g: configuration
variables in the vimrc file.

I've been trying to get VIM to compile c++ code using clang++ based on the above
comments as I prefer its debug output over gcc. Unfortunately so far without
much success and Google does not really help me in finding a solution. So I hope
that someone can point me in the correct direction as I would like to see how
the vim autocompletion works.

I'm currently using the 2.9 branch of clang + llvm on FreeBSD stable and can
compile a hello world program from the commandline directly so both clang and
clang++ are in the path. However when running vim with the above vimrc file I
however fail to compile the same bit of code from within VIM (using :make
<program name>).

In this I set make in VIM to cLang by typing :set makeprg=clang in VIM. Yet the
output I get makes no sense to me although it clearly is using clang to do the
compile. Hopefully somebody can point out what I do wrong here?

fyi) below is the compiler or linker output I get when running :make hello
although it probably is not relevant. The same code compiles without problems
when compiling from the CMD-line