Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

enabling cpp header file checking with syntastic in vim

Tags:

c++

vim

syntastic

I just started using syntastic for vim, and I'm loving it so far, but I have one tiny issue. If the file extension is not cpp, running ":SyntasticCheck" does absolutely nothing. This is a problem, as I would like to run syntastic on header files as well, with extensions such as ".h" or ".hpp". Can anyone help me out? I'm using 'gcc' as my cpp syntastic-checker, if that helps.

like image 384
Dan Cauley Avatar asked Oct 03 '22 08:10

Dan Cauley


1 Answers

Add the following to your vimrc

let g:syntastic_cpp_check_header = 1

this setting was found by reading the comment at the top of <syntastic>/syntax_checker/cpp/gcc.vim

like image 99
FDinoff Avatar answered Oct 05 '22 23:10

FDinoff