Nesh
Nesh

Reputation: 2541

How to get rid of multiple sub files created while usng VIM in Windows

Vim is creating multiple sub files when editing a file under Windows. Please let me know how can I get rid off from the files like - .app.js.un~ or app.js~.

FYI - I also closed the command prompt and still these temporary files exists in the folder.

I saved the files with :wq!

Let me know what settings/config I need to change or what I am doing wrong with the command.

Please check the screenshot -

Capture

Upvotes: 0

Views: 55

Answers (1)

Fabius Wiesner
Fabius Wiesner

Reputation: 926

<file>.un~ is an undo history file and let you undo/redo changes (u/Ctrlr) even after closing and opening again the file later.

<file>~ is a backup file with all file contents before your last change.

If you really want to disable them do:

:set noundofile
:set nobackup

Or add the same commands into <Programs>/Vim/_vimrc. Note that the undo file is not enabled by default, so you can just delete or comment the set undofile command you will find in your <Programs>/Vim/_vimrc file.

Upvotes: 2

Related Questions