CCode - An autocompletion daemon for the C programming language.
- Relies on the C99 compliance (flexible array members, snprintf behaviour, etc).
- Mostly done, but has few quirks.
- Can be used to complete C++/ObjC, but I'm not targeting these languages. Don't report C++/ObjC specific bugs.
- Currently only per directory CFLAGS configuration (just dump your CFLAGS to .ccode file). CCode supports shell expansion, e.g.
echo "\$(pkg-config --cflags sdl)" > .ccode
will execute pkg-config with each autocompletion request. - Should work on both 32 and 64 bit machines.
- Install llvm throu
brew install llvm
and add it to PATH (read output) - Build everything
make
- Instal
sudo make install
(default /usr/local/bin) - Install vim plugin
cp plugin/ccode.vim ~/.vim/plugin/
- Daemon starts automatically, everything should work out of the box.
- Plugin automatic open autocompletion after type :, ., -> or use for autocompletion.
ccode.py
— Sublime Text 2 Plugin for completion codeplugin/ccode.vim
— VIM Plugin for completion codeccode
— Client/Server program for generate completions
My linux distribution contains broken LLVM/clang build and clang doesn't see its include directory (/usr/lib/clang/2.8/include). What should I do?
In your project dir: echo " -I/usr/lib/clang/2.8/include" >> .ccode
.
How disable autmatic completion after :, ., ->?
Put g:ccode_auto = 0
in you .vimrc