我已经下载了vim插件cpp_cppcheck
,但已将其复制到~/.vim/ftplugin/c_cppcheck.vim
,以便它也可以使用C文件。它似乎工作得很好,但我现在想要在shell上激活选项--enable-all
。在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
冒号的头部时,它似乎不会在命令行中接受它。如何设置我想要的配置?
答案 0 :(得分:1)
这是一个全局变量。见:h :let
:let g:cpp_cppcheck_options = 'whatever'