Tim, the Enchanter

What manner of man are you that can summon up code without C# or Java?

Thursday, July 31, 2008

 

crontab: temp file must be edited in place

This is an error message I ran into after upgrading vim from 7.0 to 7.1, after editing a crontab file:

  crontab: temp file must be edited in place

What was weird is this error message went away if I deleted my ~/.vimrc file. If ~/.vimrc was blank, the error message was still there, so it wasn’t caused by any command in particular.

It turned out to have something to do with vim’s backup strategy. I am supposing there is a default vimrc file somewhere that gets loaded if ~/.vimrc doesn’t exist.

After some googling, I fixed it by adding the following to my ~/.vimrc file:

  set backupskip=/tmp/*,/private/tmp/*" 

VIM already defaulted this value to ”/tmp/”. I don’t know why defining my own .vimrc made vim not recognize /private/tmp/ as a temp directory any more, but I don’t care enough to find out right now.

Labels: ,


Comments:
Thanks
 
Awsome. Worked like a charm on my Leopard Server.
 
Works great, thanks. I removed the double quote at the end of the backupskip line.
 
Thanks a lot. Definitely would have wasted a lot of time without your blog.
 
WFM,thank you
 
thanks
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

March 2008   April 2008   May 2008   June 2008   July 2008   August 2008   October 2008   November 2008   February 2009   June 2009   December 2009   January 2010   February 2010   May 2010   June 2010   November 2010  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]