Vim (and by extension, GVim) has swapfiles, which are usually created in the same directory as the file, but can also be placed in a single common directory. Swapfiles are enabled by default, and for configuring the location, see
'directory' 'dir' string (default for Amiga: ".,t:",
for MS-DOS and Win32: ".,$TEMP,c:\tmp,c:\temp"
for Unix: ".,~/tmp,/var/tmp,/tmp")
List of directory names for the swap file, separated with commas.
- The swap file will be created in the first directory where this is
- Empty means that no swap file will be used (recovery is
- A directory "." means to put the swap file in the same directory as
the edited file. On Unix, a dot is prepended to the file name, so
it doesn't show in a directory listing. On MS-Windows the "hidden"
attribute is set and a dot prepended if possible.
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
put the swap file relative to where the edited file is. The leading
"." is replaced with the path name of the edited file.
- For Unix and Win32, if a directory ends in two path separators "//"
or "\\", the swap file name will be built from the complete path to
the file with all path separators substituted to percent '%' signs.
This will ensure file name uniqueness in the preserve directory.
So, in your
And make sure that