Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore errors and warnings for a VIM plugin

Suppose I have a VIM plugin that is very useful, but it generates a lot of errors/warnings that I don't care for.

How can I ignore all errors from that plugin? I just want to be disturbed by these messages anymore.

Is there any setting/function call that turns off such things?

I know that the best thing would be to report this as issue, but how can I just make them not appear?

Example of errors:

like image 876
Ionică Bizău Avatar asked Aug 06 '14 10:08

Ionică Bizău


1 Answers

Well, I would definitely look into the root cause of the errors, as it might affect the plugin's functionality. At least this should allow you to send a precise bug report to the plugin's author.

Errors and warnings can be suppressed via the :silent! (note the !) command. Basically, any Ex command can be prefixed with it. So, if you have a :TroublesomeCommand, you can silence the errors via

:silent! TroublesomeCommand

To silence the plugin (if you really must), you can might be able to redefine its mappings (to include :silent!) and commands, but the use of <SID> may force you to modify the plugin itself. In that case, you can also put the :silent! directly before the offending command (the error should include its location), but again, fixing the root cause would be preferable.

like image 123
Ingo Karkat Avatar answered Sep 24 '22 17:09

Ingo Karkat