LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   all those *~ files (https://www.linuxquestions.org/questions/slackware-14/all-those-%2A%7E-files-804070/)

Asido 04-25-2010 08:05 AM

all those *~ files
 
I was thinking, how to disable backup files? It is kinda annoying when editing lot of files and I personally see no point having them.

repo 04-25-2010 08:08 AM

You could run a cronjob to delete them.

Asido 04-25-2010 08:15 AM

Quote:

Originally Posted by repo (Post 3947063)
You could run a cronjob to delete them.

Yes, it can be deleted with one command, but since I have never used them, I thought, is it possible to disable them?

Richard Cranium 04-25-2010 08:27 AM

It would help to know which editor you are using. I would guess emacs from the file pattern.

repo 04-25-2010 08:27 AM

Depends from which editor they come from.
Did you looked in the preferences?
In kwrite you can disable "backup on save".

Asido 04-25-2010 08:40 AM

I use GVIM mostly.

Quote:

Originally Posted by repo (Post 3947074)
Depends from which editor they come from.
Did you looked in the preferences?
In kwrite you can disable "backup on save".

Aha, found such option in KWrite, but don't see in GVIM nor Emacs

catkin 04-25-2010 08:51 AM

For vim (and Gvim?) try adding set nobackup to ~/.vimrc

Asido 04-25-2010 09:15 AM

Quote:

Originally Posted by catkin (Post 3947091)
For vim (and Gvim?) try adding set nobackup to ~/.vimrc

That helped. Thanks!

modprob 04-25-2010 10:03 AM

Those backups could be handy. Why not tell vim to save them in a special folder?

I created a .vim-backups directory and set the option in the .vimrc

Code:

set backupdir=~/.vim-backups

Richard Cranium 04-25-2010 12:30 PM

For emacs, M-x customize-variable make-backup-files

For many editors, you can tell them to not make backup files when the original file is under version control.

stormtracknole 04-25-2010 02:59 PM

Quote:

Originally Posted by modprob (Post 3947140)
Those backups could be handy. Why not tell vim to save them in a special folder?

I created a .vim-backups directory and set the option in the .vimrc

Code:

set backupdir=~/.vim-backups

Awesome! I didn't know about that feature. This will come in handy.

dive 04-25-2010 03:17 PM

+1 for that.


All times are GMT -5. The time now is 09:01 AM.