Sunday, February 22, 2009

Stop Vim From Creating Backup Files of bzr_log entries during commit

Here's a handy tip from Paul Brannan. I pulled this from a Launchpad bug report.

I use Vim as my default $EDITOR. When I commit a change using bzr, it opens Vim up and lets me type my comments in.

Unfortunately after I save and edit, it leaves behind a bzr_log backup file with a ~ in that directory too. I want Vim to make those backup files normally, but not when doing bzr commits.

Paul to the rescue:

I solved this with:

~/.vimrc:
filetype on
filetype plugin on

~/.vim/ftplugin/bzr.vim:
set nobackup

(See - it pays to read bug reports! Now go check out all the other ones and let me know the good parts ok?)

No comments:

Post a Comment