View previous topic :: View next topic |
Author |
Message |
fusion1275 Apprentice

Joined: 30 Oct 2005 Posts: 185
|
Posted: Tue Apr 25, 2006 6:05 pm Post subject: Backup files driving me loopy!!! |
|
|
Hi all,
Can someone please please PLEASE tell me how to stop my system making those annoying "backup~" files everytime I save a piece of work.
Ive had a look in /etc/vim/vimrc but there is nothing that stands out to tell me to switch it off.
Cheers _________________ AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5 |
|
Back to top |
|
 |
sternklang Veteran


Joined: 10 Sep 2005 Posts: 1641 Location: Somewhere in time and space
|
Posted: Tue Apr 25, 2006 6:19 pm Post subject: |
|
|
Hello,
See this tip from the Vim site.
Also, from the VimDoc site: Code: | *07.4* Backup files
Usually Vim does not produce a backup file. If you want to have one, all you
need to do is execute the following command:
:set backup
The name of the backup file is the original file with a ~ added to the end.
If your file is named data.txt, for example, the backup file name is
data.txt~.
If you do not like the fact that the backup files end with ~, you can
change the extension:
:set backupext=.bak
This will use data.txt.bak instead of data.txt~. |
And not to be a hardass, but these were the first couple of results from Googling "vim backup files". Just a friendly reminder that Google Is Your Friend (tm).  |
|
Back to top |
|
 |
fusion1275 Apprentice

Joined: 30 Oct 2005 Posts: 185
|
Posted: Tue Apr 25, 2006 6:23 pm Post subject: |
|
|
Yeah I found that site too and have even copied that line "set backup" to my vimrc file and still no joy. Tried "set nobackup" and nothing.
Ive looked at the man pages for the SET command and have tried to use UNSET aswell and still nothing.
Any other ideas???? _________________ AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5 |
|
Back to top |
|
 |
fusion1275 Apprentice

Joined: 30 Oct 2005 Posts: 185
|
Posted: Tue Apr 25, 2006 6:24 pm Post subject: |
|
|
Oh and I came here for help not instructions on how to search online.. been there, done that  _________________ AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5 |
|
Back to top |
|
 |
trupoet Apprentice


Joined: 08 Aug 2002 Posts: 160
|
Posted: Tue Apr 25, 2006 6:46 pm Post subject: |
|
|
Weird, it sounds like when you add the :set backup vim puts backups out there, not the other way around.
Maybe removing that from both your .vimrc in your home as well as the global vimrc if you haven't already. |
|
Back to top |
|
 |
sternklang Veteran


Joined: 10 Sep 2005 Posts: 1641 Location: Somewhere in time and space
|
Posted: Tue Apr 25, 2006 7:11 pm Post subject: |
|
|
fusion1275 wrote: | Oh and I came here for help not instructions on how to search online.. been there, done that  |
Sorry, I didn't realize - some people out there do need the reminder, though.
I just tested this out -- I was not getting backup files. I put "set backup" in my .vimrc and now I was getting backups. Changed that to "set nobackup" in .vimrc and no more backups were being created. This was with vim-7.0_beta, but the behavior was the same in the 6.x series.
Could there be some permissions issue with .vimrc? Could you try some other set command there (perhaps "set backupext=.abc") and see if vim picks it up? |
|
Back to top |
|
 |
|