简体   繁体   中英

Vim Syntastic show warnings and set warning level

I use Vim with syntastic to code in C++ and I see all errors but I don't get any warnings. It would be nice if I didn't have to use the compiler in the terminal just to get all compiler-messages. Some errors differ in different c++ standards so it should be possible to at least change the version of c++ to error-check for.

  • How do I do I show warnings?
  • How do I set the warning levels and settings as I do when I compile a program using g++?
  • How do I set this up if I start using another language? If I get a specific command to run for c++, then I would be lost the next time.

I can't find how to do this from the manual at :h syntastic . I have only looked at the sections that I thought were relevant however.

for every project, in .vimrc in the project folder i will put something like

let g:syntastic_cpp_compiler_options="-m32 -I ./inc -I ./inc/libs"

you can select -w , -Wno- or any warning level you want

use g:syntastic_c_compiler_options for pure C code

ofcourse you put this in the global .vimrc. here we use vim to edit code in several programming languages, so we use different .vimrc per project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM