[英]disable whitespace checks for C++ files in vim syntastic
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.
不幸的是,这就是公司决定采用的样式(糟糕)。我宁愿看不到syntastic在vim中产生的“混合缩进”错误,但我不想完全将其关闭。 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.
我的vimrc会自动删除结尾的空格并修复缩进,因此我真的不需要这些检查。
I suppose it's vim-airline. 我想这是vim航空公司。 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' ]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.