A couple more interesting ideas:
Set 'nowrapscan' in the .vimrc, but catch an E385 (search hit bottom without match) and offer to wrap to the beginning (temporarily set wrapscan).
Or, similar to the initial use of rebuilding tags if a tag is not found, modify 'path' if a file is not found for gf and friends.
Does the autocmd work to catch things thrown by :throw? If so there could be all kinds of uses for that.
Writes failing for files being readonly could prompt to retry with the sudo + tee trick.
I'm sure clever plugin authors will find plenty more.
function! s:OverrideCmd(msg)
if a:msg =~ "^E492: Not an editor command: "
" something
endif
endfunction
au! Error E492 call s:OverrideCmd(v:errmsg)
For example, create command name leading lower letter, multibyte string, or etc.
I'm not strong opinion about this patch, but we need to consider for effect to others.
- mattn