我如何设置cpp_cppckeck选项?

时间:2017-06-08 19:09:34

标签: c vim plugins cppcheck

我已经下载了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冒号的头部时,它似乎不会在命令行中接受它。如何设置我想要的配置?

1 个答案:

答案 0 :(得分:1)

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

:let g:cpp_cppcheck_options = 'whatever'