Vim E325: ATTENTION Found a Swap File
Workaround available Linux, macOS, Windows Updated October 21, 2026
Quick answer
A leftover .swp file from a crashed or still-open Vim session. Press R to recover, then delete the swap file, or press D/E if you have no unsaved work.
Most likely fix: Check for another running session first.
Symptoms
Opening a file shows 'E325: ATTENTION Found a swap file by the name .file.swp' with options [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort.
Why it happens
- The file is still open in another Vim window or SSH session
- Vim, the terminal or the SSH connection crashed or was closed without quitting
- Laptop went to sleep / Wi-Fi dropped while editing
How to fix it
Try these in order — the most common fix is first.
1. Check for another running session first
- Read the 'process ID' line in the warning
- If it says '(STILL RUNNING)', switch to that session and save/quit there instead
- Press Q to quit without touching anything
2. Recover unsaved changes
- Press R at the prompt (or run vim -r file)
- Compare with the saved file using :DiffOrig if available
- Save with :w if the recovered version is right
3. Delete the swap file
- After recovering (or if you have nothing to recover), quit Vim
- Run rm .file.swp in the file's directory (ls -a to see it)
- Or press D at the prompt when it is offered
4. Open anyway
- Press E to edit anyway or O to open read-only
- Be careful: two sessions editing the same file can overwrite each other
This guide also covers
- vim found a swap file
- e325 attention
- vim swp file
- how to delete vim swap file
Still not working?
If Vim keeps failing, you're not alone. See every Vim problem users report or the alternatives people switch to.
Other Vim errors
- How to Exit Vim (Stuck in Vim)
- Vim Copy to Clipboard Not Working
- Vim E212: Can't Open File for Writing
- Vim E37: No Write Since Last Change
- Vim Backspace Not Working in Insert Mode
- Vim Paste Indentation Messed Up (Staircase Effect)
- Vim Colors Wrong in tmux
- Why Is Vim So Slow? (Large Files & Long Lines)
- Vim Arrow Keys Insert A B C D
- Vim Requires Python 3 Support Error (YouCompleteMe)
- Vim Modeline Vulnerability CVE-2026-34982