Selaa lähdekoodia

vim: Fix editing crontabs with crontab -e

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>
Florian Fieber 9 vuotta sitten
vanhempi
commit
9f4c0abc22
3 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 1
    1
      utils/vim/Makefile
  2. 1
    0
      utils/vim/files/vimrc
  3. 2
    0
      utils/vim/files/vimrc.full

+ 1
- 1
utils/vim/Makefile Näytä tiedosto

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=vim
11 11
 PKG_VERSION:=7.4
12
-PKG_RELEASE:=2
12
+PKG_RELEASE:=3
13 13
 VIMVER:=74
14 14
 
15 15
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2

+ 1
- 0
utils/vim/files/vimrc Näytä tiedosto

@@ -9,3 +9,4 @@ set linebreak		" don't wrap words by default
9 9
 set textwidth=0		" don't wrap lines by default
10 10
 set ruler			" show the cursor position all the time
11 11
 
12
+set backupskip+=/etc/crontabs.*	" fix crontab -e

+ 2
- 0
utils/vim/files/vimrc.full Näytä tiedosto

@@ -9,6 +9,8 @@ set linebreak			" don't wrap words by default
9 9
 set textwidth=0			" don't wrap lines by default
10 10
 set ruler			" show the cursor position all the time
11 11
 
12
+set backupskip+=/etc/crontabs.*	" fix crontab -e
13
+
12 14
 if filereadable(expand("$VIMRUNTIME/syntax/synload.vim"))
13 15
 	syntax on
14 16
 endif