Anthony
Anthony

Reputation: 2296

Vim/Syntastic C/C++ syntax checking: possible to configure to build precompiled headers?

I'm using syntastic in vim to provide syntax checking for C/C++ files. Most of the time its current configuration is fast enough, but sometimes, if a header file contains a large number of other header files (in this case I'm including Rcpp, library for building R packages) the syntax checking step takes a noticeably long time, a few seconds. I save frequently while I work so this starts to become a bit cumbersome. I'd rather not disable it because it's a great help, especially since some of the in-house libraries I'm using can use inconsistent naming conventions (which I often forget) so it saves quite a bit of time.

Is there a way to configure syntastic to build precompiled headers when first run on a file? That should speed up the compilation without too much inconvenience (to me :-).

Alternatively I could disable syntax checking all together and only execute it manually, but I'd rather avoid that if possible.

Upvotes: 1

Views: 726

Answers (1)

Brian Salehi
Brian Salehi

Reputation: 414

Syntastic has nothing to do with compilation of sources.
I had similar issues with Syntastic with a few of C++ standard headers and I fixed it by add following configuration in ~/.vimrc file:

let g:syntastic_cpp_errorformat = "errorformat"

Hope this helps people not to waste hours of time on this issue like me.

Upvotes: 0

Related Questions