I use gvim on windows and I want to know a way to disable the temp file(ending in ~) file creation. Also is there a problem if we do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can disable the backup file by putting this line in your .vimrc:
I almost always do this, as the ~ file is more annoying that useful. There is no problem with doing this, you’ll just lose the ability to revert to a backup of the file.
If you want to get rid of the temporary .swp (swap) file too, you can also set this:
The swap file is created when you have a file open, and provides some backup/recovery security, in case Vim crashes while editing a file. It also can prevent multiple Vims from editing the same file. I usually just turn this off too, because I rarely have a use for it. The .swp file isn’t as annoying as the ~ file, because it goes away when you close Vim, but I still just turn that feature off.