Nikolay Fominyh
Nikolay Fominyh

Reputation: 9246

How to reopen buffer in vim?

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:

  1. Delete buffer
  2. Find closed file
  3. Open file again

How can I automate this process?

Upvotes: 12

Views: 5605

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172570

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.

Upvotes: 18

Related Questions