Monday, April 9, 2012

Swap file already exists


The last couple days I have been getting a "swap file already exists" message when I attempt to open a file. When that happens, as you are aware, the user is given several options, which to me are extremely confusing. A factor I feel certain is involved is that on a couple occasions either vim or a vim window was closed in other than normal fashion. [E.g., on one occasion, while I was running the computer on battery power, the battery ran down while I was away from my desk. Normally, when that happens the computer goes into suspend mode and when I attach the power cord the computer starts back up in the state it was in when it went into suspend mode. This time, however, it shut down. After restarting the computer I got the "swap file already exists" message when I restarted vim and attempted to load a file.] 

When I get the message I am never certain what to do. Usually I know that the file had been saved after the last edit. Even in that case i'm not sure what to do to open the most recently saved copy of the file. When I'm uncertain, I don't know which option will give me the most recent copy of the file. Or if I make the wrong choice, how I might recover---if that is possible at all.

I imagine experienced programmer-users of vim would not have this problem. I am neither. I am a non-programming relative novice vim user. Help regarding my options and best choices in this situation would be greatly appreciated.

Thanks,
------------------------------------------------------------------------------------------

"Human coexistence and social life constitute the good common to us all 
from which and thanks to which all cultural and social goods derive." 

- Zygmunt Bauman

No comments: