gpt4 book ai didi

c++ - 在 vim syntastic 中禁用对 C++ 文件的空格检查

转载 作者:搜寻专家 更新时间:2023-10-31 01:00:35 26 4
gpt4 key购买 nike

我工作的地方到处都是混合缩进。不幸的是,这是公司决定采用的风格(讨厌。)我不想在 vim 中看到 syntastic 产生的“混合缩进”错误,但我不想完全关闭它。有没有办法禁用空白检查或其他东西?或者我可以以某种方式切换到更好的检查器吗?我的 vimrc 会自动删除尾随空格并修复缩进,所以我真的不需要这些检查。

最佳答案

我想是 vim-airline。阅读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

还有:

* 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' ]

关于c++ - 在 vim syntastic 中禁用对 C++ 文件的空格检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30811980/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com