![]() ![]() ![]() ~ is an undo file, containing the undo trees of the file edited. The location of the file is determined by the backupdir option. Myfile.txt~ is a backup file - the version of myfile.txt before your edited it. The directory option is available in both Vim and Vi. That’s why your working directory is in such a mess. , and then ~/tmp, and then /var/tmp, and finally /tmp. This means Vim will try to save this file in the order of. The location of this file is set with directory option. While editing a file, you can see which swap file is being used by entering :sw. is a swap file, containing the unsaved changes. set backupdir=.backup/,~/.backup/,/tmp// set directory=.swp/,~/.swp/,/tmp// set undodir=.undo/,~/.undo/,/tmp// Swap file Have you been annoyed by a trail of similarly named files created by Vim? What are these files? How do we get rid of them, especially in a git repo? If you are in a hurry, put the following three at the end of your. Vim: Remove swap, backup and undo Files from Working Directory $ ls -a.
0 Comments
Leave a Reply. |