[vim] Fix handling of invalid search regexps.

I forgot that with incremental search, partial regexps may cause unexpected exceptions. This patch swallows any regexp parsing exceptions for incremental search and fixes a bug in the substitution code.