2

我正在使用vim插件YouCompleteMesyntastic进行自动完成和语法检查。

如果我正在编辑 C 或 C++ 文件,则会在两秒不活动后标记语法错误。mlint编辑 MATLAB 文件时,仅在我保存文件后才进行语法检查(使用)。

我知道两秒的间隔是通过 调节的updatetime,这意味着在交换文件更新后执行 C 文件的检查。

我怎样才能为其他编程语言的源文件(尤其是 MATLAB)获得相同的行为?

4

1 回答 1

3

The background checking of C-family languages is a product of YCM's syntastic intergration (see :h youcompleteme-syntastic-integration and :h g:ycm_register_as_syntastic_checker). I don't see an easy way to set YCM to do that with other file types or to set syntastic to auto-update.

You might be able to dig around in YCM's code to see how they do it, then either extend that to work with MATLAB files or write a small plugin.

于 2013-10-16T22:51:33.327 回答