This is a discussion on crontab not working with vim within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, When i use vim, changes i make in my crontab entries do not get saved. Does anyone have ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, When i use vim, changes i make in my crontab entries do not get saved. Does anyone have seen this before, or have an idea what may be causing it? I'm using Slackware 10.0/10.1 with vim-6.3.007-i486-1. Everything works fine when using elvis. I know i can just edit /var/spool/cron/crontabs/* by hand, but i'd like to fix this anyway.. Regards, roel -- BViT Innovatienetwerk / rolek@bvit.net \ www.bvit.net 1A First Alternative / rolek@alt001.com \ www.alt001.com |
| |||
| Roel van Meer wrote: > When i use vim, changes i make in my crontab entries do not get saved. > Does anyone have seen this before, or have an idea what may be causing > it? The problem is caused by vims backupcopy setting, which is automatically changed by set nocompatible. If you have a .vimrc file, set nocompatible is done automatically, by the way. set backupcopy=yes -> crontab -e works set backupcopy=no -> crontab -e does not work set backupcopy=auto -> crontab -e does not work Putting "set backupcopy=yes" in either my .vimrc or in the global /usr/share/vim/vimrc fixes the problem. YMMV, Regards, roel -- BViT Innovatienetwerk / rolek@bvit.net \ www.bvit.net 1A First Alternative / rolek@alt001.com \ www.alt001.com |
| |||
| Roel van Meer wrote: > Hi, > > When i use vim, changes i make in my crontab entries do not get saved. > Does anyone have seen this before, or have an idea what may be causing > it? > > I'm using Slackware 10.0/10.1 with vim-6.3.007-i486-1. Everything works > fine when using elvis. I know i can just edit /var/spool/cron/crontabs/* > by hand, but i'd like to fix this anyway.. I have the same problem with emacs, so if anyone know a solution for this editor, I'm also interested. /Mads -- Mads Jensen - remove z's in email If the code and the comments disagree, then both are probably wrong. -- Norm Schryer |
| |||
| Dnia 03/10/2005 02:58 PM, Uzytkownik Roel van Meer napisal: > Hi, > > When i use vim, changes i make in my crontab entries do not get saved. > Does anyone have seen this before, or have an idea what may be causing > it? Hi - I also have the same problem. Setting eg. VISUAL=mcedit works fine and changes are saved correctly. But, there is (in my situation) something strange. When i run: crontab -e as root, changes are not saved, as normal user - everything is all right. I also have done 'strace' between 2 users. And there is nothing strange - no important differences. I'm running slackware 9.1, 10.0 and current. Vim - tested on 6.2 and 6.3.007 On 3 of 4 machines vim + crontab works fine. One of them - not Strace for normal user is here: http://jacek.dyski.one.pl/cron/jacek.txt Same for root http://jacek.dyski.one.pl/cron/root.txt Permissions on all machines are the same, so not here is the problem. Jacek |
| |||
| Jacek Kalinski wrote in <113Yd.114078$2e4.81519@news.chello.at>: > Uzytkownik Roel van Meer napisal: > > > > Hi, > > > > When i use vim, changes i make in my crontab entries do not get saved. > > Does anyone have seen this before, or have an idea what may be causing > > it? > > Hi - I also have the same problem. > Setting eg. VISUAL=mcedit works fine and changes are saved correctly. > But, there is (in my situation) something strange. When i run: > crontab -e > as root, changes are not saved, > as normal user - everything is all right. > > I also have done 'strace' between 2 users. And there is nothing strange > - no important differences. > > I'm running slackware 9.1, 10.0 and current. > Vim - tested on 6.2 and 6.3.007 > > On 3 of 4 machines vim + crontab works fine. > One of them - not There *must* be a config difference there somewhere... I've never had that problem. I changed the symfiles in /usr/bin... /usr/bin 116 :-) ls -l vi* lrwxrwxrwx 1 root root 3 Dec 11 2002 vi -> vim lrwxrwxrwx 1 root root 5 Dec 11 2002 view -> elvis -rwxr-xr-x 1 root bin 936180 Jun 8 2002 vim lrwxrwxrwx 1 root root 3 Dec 11 2002 vimdiff -> vim -rwxr-xr-x 1 root bin 1068 Jun 8 2002 vimtutor And all users, including root, have the same .vimrc file (I put it in /etc/skel): set incsearch set ignorecase set scrolloff=2 set smartcase And that's it. Everything's as smooth as silk. ----snip---- Ned -- True Blue FAQ: <422447E2.30EB.6B8B4567@arthur.valhalla.oz> Public key: http://pgp.mit.edu/ http://www.keyserver.net/en/ Fingerprint: D17C FDD5 BBA8 8687 42E3 C8F2 C9FB 0314 E17A 0CD7 |
| |||
| ned@arthur.valhalla.oz (Ned Latham) writes: > There *must* be a config difference there somewhere... > In your .vimrc make sure that you have not got set nocompatible and that you have got set backupcopy=yes hth Glyn -- RTFM http://www.tldp.org/index.html GAFC http://slackbook.lizella.net/ STFW http://groups.google.com/groups?hl=e...inux.slackware JFGI http://jfgi.us/ |
| |||
| Dnia 03/11/2005 02:20 PM, Użytkownik Ned Latham napisał: > There *must* be a config difference there somewhere... No - there isn't. > I've never had that problem. I changed the symfiles in /usr/bin... > > /usr/bin 116 :-) ls -l vi* > lrwxrwxrwx 1 root root 3 Dec 11 2002 vi -> vim > lrwxrwxrwx 1 root root 5 Dec 11 2002 view -> elvis > -rwxr-xr-x 1 root bin 936180 Jun 8 2002 vim > lrwxrwxrwx 1 root root 3 Dec 11 2002 vimdiff -> vim > -rwxr-xr-x 1 root bin 1068 Jun 8 2002 vimtutor /usr/bin$ ls -l vi* (from vim 6.3.007) lrwxrwxrwx 1 root root 3 Mar 13 2004 vi -> vim* lrwxrwxrwx 1 root domain 3 Feb 11 14:01 view -> vim* -rwxr-xr-x 1 root bin 1062808 Jun 26 2004 vim* lrwxrwxrwx 1 root domain 3 Feb 11 14:01 vimdiff -> vim* -rwxr-xr-x 1 root bin 1600 Jun 26 2004 vimtutor* > And all users, including root, have the same .vimrc file (I put it > in /etc/skel): Yes - me too. diff between user .vimrc and root has no differance. :syntax enable :set backspace=indent,eol,start :set ruler I say once more: the same machine - root cannot edit cron (via crontab+vim), but normal user - can. It is strange. Jacek |
| |||
| Dnia 03/11/2005 03:11 PM, Uzytkownik Glyn Millington napisal: > In your .vimrc make sure that you have not got > > set nocompatible No - I havn't it. > and that you have got > > set backupcopy=yes Yes - I have tried setting this into: yes, no and auto and all of 4 configurations (because 4th is where .vimrc did not have this line set) does not work. Normal user still can edit cron, but root cannot. Jacek |
| |||
| Jacek Kalinski <jacek_kal@go2._NOSPAMPLEASE_.pl> writes: > Dnia 03/11/2005 03:11 PM, Uzytkownik Glyn Millington napisal: >> set nocompatible > No - I havn't it. >> and that you have got >> set backupcopy=yes > Yes - I have tried setting this into: yes, no and auto and all of 4 > configurations (because 4th is where .vimrc did not have this line set) > does not work. > Normal user still can edit cron, but root cannot. Can you edit crontab if you link "vi" to elvis ? ie is the problem with vim? If it works with elvis and not with vim, can you post your root ..vimrc for us to see please? atb Glyn -- RTFM http://www.tldp.org/index.html GAFC http://slackbook.lizella.net/ STFW http://groups.google.com/groups?hl=e...inux.slackware JFGI http://jfgi.us/ |
| ||||
| On 2005-03-11, Jacek Kalinski <jacek_kal@go2._NOSPAMPLEASE_.pl> wrote: > Dnia 03/11/2005 02:20 PM, Użytkownik Ned Latham napisał: >> There *must* be a config difference there somewhere... > > No - there isn't. > > I say once more: the same machine - root cannot edit cron (via > crontab+vim), but normal user - can. It is strange. > > Jacek No help, however......... I could never get vim to work correctly with crontab, for whatever reason, I gave up. My solution, use pico. ken |
| Thread Tools | |
| Display Modes | |
|
|