Skip to content

gordio/ccode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCode - An autocompletion daemon for the C programming language.

  1. Relies on the C99 compliance (flexible array members, snprintf behaviour, etc).
  2. Mostly done, but has few quirks.
  3. Can be used to complete C++/ObjC, but I'm not targeting these languages. Don't report C++/ObjC specific bugs.
  4. 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.
  5. Should work on both 32 and 64 bit machines.

screenshot CCode in VIM

Manual Installation

  1. Install llvm throu brew install llvm and add it to PATH (read output)
  2. Build everything make
  3. Instal sudo make install (default /usr/local/bin)
  4. Install vim plugin cp plugin/ccode.vim ~/.vim/plugin/
  5. Daemon starts automatically, everything should work out of the box.
  6. Plugin automatic open autocompletion after type :, ., -> or use for autocompletion.

Files

  • ccode.py — Sublime Text 2 Plugin for completion code
  • plugin/ccode.vim — VIM Plugin for completion code
  • ccode — Client/Server program for generate completions

FAQ

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

About

An autocompletion daemon for the C programming language (vim, libclang, omnifunc)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.4%
  • Vim Script 1.9%
  • Python 1.8%
  • Other 0.9%