2017-06-08 16 views
1

我已經下載了vim插件cpp_cppcheck,但已經將它複製到~/.vim/ftplugin/c_cppcheck.vim,它也可以用於C文件。它似乎工作正常,但我現在想要激活選項--enable-all,就像一個可以在外殼上一樣。我如何設置cpp_cppckeck選項?

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頭,它似乎並不接受它的命令:在cppcheck幫助窗口它下面說在底部一行。我怎樣才能設置我想要的配置?

回答

1

這是一個全局變量。見:h :let

:let g:cpp_cppcheck_options = 'whatever'