disable whitespace checks for C++ files in vim syntastic

1.4k views Asked by At

The place I work has mixed-indents all over. Unfortunately, that is the style the company has decided on (yuck.) I would rather not see the "mixed-indent" errors produced by syntastic in vim, but I don't want to turn it off altogether. Is there a way to disable whitespace checks or something? Or can I switch to a better checker somehow? My vimrc automatically removes trailing whitespace and fixes indents, so I really don't need those checks anyway.

1

There are 1 answers

5
theGiallo On

I suppose it's vim-airline. Reading the help:

* customize the type of mixed indent checking to perform.
  " must be all spaces or all tabs before the first non-whitespace character
  let g:airline#extensions#whitespace#mixed_indent_algo = 0 (default)

  " certain number of spaces are allowed after tabs, but not in between
  " this algorithm works well for /** */ style comments in a tab-indented file
  let g:airline#extensions#whitespace#mixed_indent_algo = 1

  " spaces are allowed after tabs, but not in between
  " this algorithm works well with programming styles that use tabs for
  " indentation and spaces for alignment
  let g:airline#extensions#whitespace#mixed_indent_algo = 2

Also:

* configure which whitespace checks to enable.
  " indent: mixed indent within a line
  " long:   overlong lines
  " trailing: trailing whitespace
  " mixed-indent-file: different indentation in different lines
  let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ]