How to reopen a buffer in vim?

I am having problems with the XPTemplate vim plugin. Sometimes this leads to errors and makes editing a file impossible. I heal him by following these steps:

  • Delete buffer
  • Find closed file
  • Open file again

How can I automate this process?

+8
vim
source share
1 answer

Depending on the situation of forced reboot via :edit! may already be enough. Otherwise, you can try :bdelete | edit # :bdelete | edit # .

I would also inform the author of the plugin if you suspect it due to an error in the plugin itself.

+12
source share

All Articles