How to reopen buffer in vim?

vim

Solution

Depending on the situation, a forced reload via `:edit!` may already be enough. Otherwise, you could try `:bdelete | edit #`.

I would also inform the plugin author, if you suspect it's due to a bug in the plugin itself.

Problem

I had some issues with XPTemplate vim plugin. Sometimes it yields with errors, and makes impossible to edit file. I heal it by doing following steps: - Delete buffer - Find closed file - Open file again How can I automate this process?

Original source