Tech Forums
Get rid of Swap files created by GVIM in windows!
- Details
- Category: GVIM
- Written by Harsh
- Hits: 21939
Tired of all those swap file created by GVIM appearing where ever a file is edited? Well follow the procedure given below to get rid of them.
1. Vim is by default installed to – C:\Program Files\Vim. Find out where your copy of GVIM is installed.
2. In that directory you will see a file “_vimrc “.
3.Add the following lines to that file–
set backupdir=c:/junk,.,/tmp
set directory=.,c:/junk,/tmp
Save and exit “_vimrc”
4. Now create a directory “junk” in your C-Drive.
5. You are done.
All swap files will be put here and your workspace will now remain clean.

