Vim E325: ATTENTION — What the Swap File Error Means
<code>E325: ATTENTION</code> means Vim found an existing <code>.swp</code> swap file for the document you're opening — left by a crash or a second open session. It's a safety warning, not corruption. If the prompt says a process ID is 'still running', another Vim really has the file open — quit that one. Otherwise press <strong>(R)ecover</strong> to get unsaved edits, then delete the swap. Details below.
What E325 is telling you
Vim writes a .swp while you edit and deletes it on a clean exit. When it starts and finds a leftover swap, it raises E325: ATTENTION and shows the swap's details — the owning host, the modified time, and whether the process is still running. Two very different situations trigger it:
- 'process ID ... still running' — another Vim/Neovim genuinely has this file open. Don't recover; switch to that session (or close it) instead.
- No running process — an edit session crashed and the swap is stale. This is the normal case; recover from it.
What to do, step by step
- Read the prompt. If it says the process is still running, press
qto quit and find the other Vim. - If it crashed, press
rto recover. Vim rebuilds the buffer from the swap. - Save to a new name so you don't overwrite the original:
:saveas file.recovered. - Compare:
:diffsplit originalfileshows exactly what the swap held. - Delete the swap so the warning stops: quit Vim and run
rm .file.swp(hidden dotfile —ls -a), or pressdat the prompt.
Stop E325 coming back
The warning repeats because the stale swap was never removed. Delete it as above. If swaps on scratch files annoy you, disable them with :set noswapfile (session) or set noswapfile in .vimrc (global) — at the cost of crash recovery for those files. To keep swaps but out of your working dirs, set a central folder: set directory=~/.vim/swap//.
FAQ
What does E325: ATTENTION mean in Vim?
Vim found an existing .swp swap file for the file you're opening, left by a crash or a second edit session. It's a safety warning, not a corrupted file. Recover from it if a session crashed, or switch to the other Vim if the prompt says a process is still running.
How do I get rid of the E325 swap file warning?
Recover anything you need first (press r, save to a new name, compare with :diffsplit), then delete the swap: quit Vim and run rm .yourfile.swp (it's a hidden dotfile), or press d at the prompt. The warning stops once the swap is gone.
E325 says the process ID is still running — what now?
Another Vim or Neovim really has the file open. Don't recover — press q to quit, find and close that other session, then reopen the file. Recovering while a live session holds it can clobber your work.
Other file types explained
- What Is a .un~ File? (Vim Undo File)
- What Is a .BK File?
- Convert .crdownload to MP4 — How to Play an Incomplete Video
- Firefox Download Stuck at 100% — How to Fix the .part File
- Is It Safe to Delete .tmp Files?
- Chrome Download Stuck as .crdownload (Not Finishing) — Fix
- Safari .download File Stuck (Not Finishing) on Mac — Fix
- Opera .opdownload Stuck / Not Completing — Fix