I am using vim
with the plugins YouCompleteMe and syntastic for autocompletion and syntax checking .
If I am editing C or C++ files, syntax errors are marked after two seconds of in inactivity.
When editing MATLAB files, syntax checks (using mlint
) are done only after I save the file.
I know that the interval of two seconds is regulated via updatetime
, which means checks of C files are performed after the swap file updates.
How can I get the same behaviour for source files of other programming languages (especially for MATLAB)?
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.