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
Starting with Vim patch 8.1.0112, Vim will throw an error, if the
skip argument for the functions
searchpairpos() is not a string argument.
That caused the error message
invalid argument: 0, because the two plugins
matchpair that come with Vim, used a skip expression of
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