我已经下载了 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'
我是一名优秀的程序员,十分优秀!