PDA

View Full Version : svn: omitting backup files from vim (.bak)



orlox
July 30th, 2007, 02:26 AM
Hi! Well, my question is pretty much what the topic of the post says. Im developing a website and I'm using vim, wich generates backup files (*.bak). I need a way to make svn ignore this files when making a commit. I read something about making svn ignore certain kinds of files on a specific folder, but I need a way to make svn ignore all files of a certain type (in this case, the .bak files) when commiting.

AlexThomson_NZ
July 30th, 2007, 04:36 AM
If you can live without vim creating backups, add this to your .vimrc

set nobackup

(Don't know how to get svn to ignore them, but it's something anyway)

scooper
July 30th, 2007, 04:55 AM
You can also redirect the backup files elsewhere. For example, these lines in my ~/.vimrc file place backups and swap files in ~/.backup or in a .backup subdirectory of the working directory. If neither is found I think it follows the default rules, but merely creating ~/.backup will change where the files go.


set backupdir^=./.backup,$HOME/.backup
set directory^=./.backup,$HOME/.backup

orlox
July 30th, 2007, 05:36 AM
Perfect! Setting the backup files as you said does the trick :)

Thanx!