vim: Fix editing crontabs with crontab -e 1348/head
authorFlorian Fieber <florian@florianfieber.de>
Fri, 5 Jun 2015 14:07:56 +0000 (16:07 +0200)
committerFlorian Fieber <florian@florianfieber.de>
Fri, 5 Jun 2015 18:32:44 +0000 (20:32 +0200)
Per default, vim creates a new file and keeps the original file as backup.
This leads to crontab checking the backup file for changes instead of the
one actually being edited, resulting in any changes being silently dropped.
Since busybox's crontab saves temporary crontab files in "/etc/crontabs.*"
vim's default of "backupskip=/tmp/*" doesn't circumvent this.

This commit fixes this issue by appending "/etc/crontabs.*" to "backupskip".

Signed-off-by: Florian Fieber <florian@florianfieber.de>
utils/vim/Makefile
utils/vim/files/vimrc
utils/vim/files/vimrc.full

index da01c671ecda5d970c2ee545166cc0d5dce2e453..2e9f96a8b62cdcaa852446d36316d6d5f203c193 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vim
 PKG_VERSION:=7.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 VIMVER:=74
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 2622b773bcd3d2c5f2ca4dbf296b29c927b59bb5..b8cea293859cb9e59c857ca99cfcb56dece79790 100644 (file)
@@ -9,3 +9,4 @@ set linebreak           " don't wrap words by default
 set textwidth=0                " don't wrap lines by default
 set ruler                      " show the cursor position all the time
 
+set backupskip+=/etc/crontabs.*        " fix crontab -e
index 56305c15275b962cc9c2b716af0c1118f487e2b9..99f737e84346a53d1615491a33ca520306ce2039 100644 (file)
@@ -9,6 +9,8 @@ set linebreak                   " don't wrap words by default
 set textwidth=0                        " don't wrap lines by default
 set ruler                      " show the cursor position all the time
 
+set backupskip+=/etc/crontabs.*        " fix crontab -e
+
 if filereadable(expand("$VIMRUNTIME/syntax/synload.vim"))
        syntax on
 endif