Tech Forums

Get rid of Swap files created by GVIM in windows!

User Rating:  / 0
PoorBest 

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.

Site Login