Vim Open file E325 Warning Error

In Git bash windows, I edited the .bash_profile file and then decided not to save and close the bash console. Now when I try to open the .bash_profile with vim I get E325: Attention error. What should I do to fix this?

+3


source to share


1 answer


By closing the console without exiting Vim, the Vim process was killed and Vim had no way to properly close. Vim uses swap files to keep last unsaved changes in the buffer to avoid data loss in the event of a crash; you can read the whole story at :help E325

.

In your case, when you deliberately closed the console, there probably weren't any pending changes in your .bash_profile

[worth save]. (But there is a swap file!) So when prompted

  Swap file ".bash_profile.swp" already exists!
  [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it:

      



answer with Dto remove the obsolete paging file. Alternatively, you can also search .bash_profile.swp

(by default it is in the same directory as the edited file, most likely $HOME

in your case) and delete it manually. (It's hidden, use ls -a

in Bash or Windows Explorer.)

In the future, please exit Vim ( :qall[!]

) before closing the console in which it is started to ensure a clean shutdown.

+4


source







All Articles