You are not logged in.

#1 2012-11-02 21:35:02

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

[SOLVED] vim syntax checker for C++ templates?

I've started using Syntastic to help improve my productivity when writing C++. However, I cannot seem to get it to work with C++ templates (which are usually defined and implemented in a header file). Is there a way to force Syntastic to do this? If not, does anyone know of a vim syntax checker that will?

Last edited by bsilbaugh (2012-11-02 22:05:32)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#2 2012-11-02 22:05:12

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: [SOLVED] vim syntax checker for C++ templates?

To enable syntax checking of headers, including templates, it turns out that you just need to add the following to your vimrc:

let g:syntastic_cpp_check_header = 1

See ~/.vim/bundle/syntastic/syntax_checkers/cpp.vim for an explanation of additional C++ options.

(I don't know how I missed this earlier. Sorry for the spurious post.)

Last edited by bsilbaugh (2012-11-02 22:06:50)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

Board footer

Powered by FluxBB