Open recovery mode for a specific file.
Section: Recovery and swap workflows
Recover from a swap file
bash
bash
vim -r file.txt
nvim -r file.txtExplanation
Useful after crashes or interrupted sessions.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Recovery and swap workflows