添加對c++11的支持:
/.vimrc中添加:
let g:syntastic_cpp_compiler = ‘g++‘ "change the compiler to g++ to support c++11.
let g:syntastic_cpp_compiler_options = ‘-std=c++11 -stdlib=libc++‘ "set the options of g++ to suport c++11.
.ycm_extra_conf.py中:
將flags數組中的‘-Wc++98-compat‘修改爲‘-Wnoc++98-compat‘
取消對C++11的支持:
/.vimrc中去掉添加的兩行syntastic配置。
.ycm_extra_conf.py中改回來,並且在flags數組中將‘-std=c++11‘修改爲‘-std=c99‘