The error you see, comes from the plugin matchparen, that is distributed with vim and which does highlight the matching parenthesis as you edit them. Internally is uses the searchpairpos()
function.
Starting with Vim patch 8.1.0112, Vim will throw an error, if the skip
argument for the functions searchpair()
and searchpairpos()
is not a string argument.
That caused the error message invalid argument: 0
, because the two plugins matchparen
and matchpair
that come with Vim, used a skip expression of 0
.
So a bit later, those two plugins have been changed to make use of a skip expression of '0'
. So patch 8.1.115 fixed the matchparen plugin and patch 8.1.143 fixed a related problem with the matchit and matchparen plugin, that should keep Vim responsive, even when the pattern is not found.
If you still see the error, even after you have installed a Vim version later than 8.1.143, that means you most likely have an older matchparen plugin laying around and are not using the latest version that comes with Vim. So make so to update the runtime files properly and delete older plugins in case you have them in your local .vim
path as well.
The related issue in the Vim bug tracker is https://github.com/vim/vim/issues/3225
invalid argument: 0
and that is correct. The plugin should return'0'
instead of0
. This has been fixed in a later runtime file update, so make sure you have the latest matchparen plugin and not an outdated version laying around. See also the related issue github.com/vim/vim/issues/3225