FG
💻 Software

Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers?

Fresh5 days ago
Mar 15, 202627914 views
Confidence Score1%
1%

Problem

Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers? (If it does so at all). Background: Throughout a semi intense seminar I was taking notes in an unnamed/unsaved MacVim buffer when the MacBook ran out of juice and powered down out of nowhere (It did not sleep/hibernate as it usually would). Question: Would anyone know if there is any chance that the unsaved work may have been saved to a swap (.swp) file or the like, that could be recovered? System details: In particular this happened using MacVim on a Mac OS X 10.5.8 (But possible recovery hints for other versions are of interest too). I have not restarted MacVim yet in case doing so will initiate a cleanup process.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers?

Low Risk

Start up vim and try: If the file never had a name, then simply: That's your best bet. For more about swap files and recovery, see: About the swap files, typically they're saved in the same directory as the file being edited, but with a . added the beginning to make it hidden and .swp at the end, but it's possible to move them elsewhere by something like: or similar. See: For all the details. A vim swap file is not the same as the edited buffer, however, so be sure to read up there on what can …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment