You are not logged in.
Hi,
I'm not sure if I pressed a key combination, but when I save a file in Vi I get another file that has the same name as the original file but with the ~ character added to the end of the filename. For example, if I edit foo.txt and save it, then the original will be saved, but I'll also get a new file named foo.txt~. Does anyone know how to fix this?
Thanks!
-nterpol
Last edited by nterpol (2008-11-09 12:30:59)
Offline
This should help: http://thehumblecoder.wordpress.com/200 … kup-files/
Offline
It worked! Thanks!
Offline
I think that the default backup settings (in /etc/virc if you use the basic vi package) changed with the recent upgrade to Vim 7.2.25.
For information on file backup setting combinations, see :help backup-table in Vim.
Edit:
http://thehumblecoder.wordpress.com/200 … kup-files/
That article advocates disabling the use of swap files (:set noswapfile); however, I wouldn't recommend it. Whereas backup files are designated with a trailing tilde (~), swap files have names ending with .swp. The latter should be removed automatically when Vim exits (unless it is exited abnormally, such as when the user closes a terminal emulator without first quitting an instance of Vim that is running inside it).
Last edited by ssjlegendx (2008-11-10 04:13:24)
#!/vim/rocks
Offline