Vim and clang_complete, how to explicitly compile my code

Posted by puller on Stack Overflow See other posts from Stack Overflow or by puller
Published on 2012-06-18T09:12:16Z Indexed on 2012/06/18 9:16 UTC
Read the original article Hit count: 205

Filed under:
|

I use Vim with clang_complete for omnicompletion.

The plugin is automatically triggered when I need completion, e.g., after I type . or -> to access an object members or methods (see attached screenshot).

clang_complete showing std::map methods

The plugin works really nice, however I would need a way to trigger it manually (i.e. to compile my code for syntax checking).

This is useful for two reasons:

  1. Static syntax checking
  2. Clear previous errors which have been fixed (which otherwise will remain in their buffer). See the two screenshots below for a better understanding.

Any help is appreciated. Thanks.


Screenshot 1

Error at line 3


Screenshot 2

Error fixed

© Stack Overflow or respective owner

Related posts about vim

Related posts about clang