I\'m used to my editors autosaving files when they lose focus. I recently switched to MacVim, and I can\'t recreate that behavior. I tried this:
autocmd Bu
You don’t care about errors in those circumstances since there is nothing you can reasonably do about them anyway – especially when losing focus. So just swallow them:
autocmd BufLeave,FocusLost * silent! wall
Much simpler than an elaborate dance to figure out where there would be an error in order to avoid it.