gpt4 book ai didi

c - 如何设置 cpp_cp 检查选项?

转载 作者:太空宇宙 更新时间:2023-11-04 03:22:14 24 4
gpt4 key购买 nike

我已经下载了 vim 插件 cpp_cppcheck,但已将其复制到 ~/.vim/ftplugin/c_cppcheck.vim 以便它也可以处理 C 文件。它似乎运行良好,但我现在想激活选项 --enable-all 就像在 shell 上一样。在 cppcheck 帮助窗口中,它显示以下内容:

g:cpp_cppcheck_options  The command line options you want to pass to
Cppcheck. View your Cppcheck documentation for the
possible options.

Note that you shouldn't specify a template here! If
you do so, Vim won't be able to correctly parse the
output of Cppcheck for the quickfix-window.

The default value is empty (no options).

但是 :c_cppcheck_options:cpp_cppcheck_options 都没有给我任何东西,当我点击冒号的 g 头部时,它似乎没有在底部的命令行中接受它。如何设置我想要的配置?

最佳答案

这是一个全局变量。参见 :h :let

:let g:cpp_cppcheck_options = 'whatever'

关于c - 如何设置 cpp_cp 检查选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44443774/

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