Page 1 of 1

[SOLVED] Crontab will not Edit with Vim

Posted: 17. Sep 2017, 08:05
by Atip
I am not able to edit crontab jobs with vim.
Neither as user "crontab -e" or as "sudo crontab -e"

After Shift i I can make an input, however, cannot delete the input.
Same after Shift i no delete is possible, for example deleting #
at beginning of a line.

With sudo crontab -e opened in a terminal and all killed by clicking
X in terminal bar vim will keep running in the background using
100 % of CPU.

I double checked in my Salix box and crontab jobs can be edited with vim.

Re: Crontab will not Edit with Vim

Posted: 17. Sep 2017, 08:16
by gapan
Just a guess: you're using elvis, not vim.

Re: Crontab will not Edit with Vim

Posted: 17. Sep 2017, 08:31
by DidierSpaier
gapan wrote:Just a guess: you're using elvis, not vim.
@Atip: this is the case if you type "vi" in a terminal as in Slint (as in Slackware) /usr/bin/vi is a symlink to /usr/bin/elvis. Then, to start vim just type "vim" instead.

Re: Crontab will not Edit with Vim

Posted: 17. Sep 2017, 21:52
by gapan
My point is that crontab -e uses the default EDITOR, which happens to be vi, not vim, therefore it is elvis in slint. Either remove elvis and point the symlink to vim, or set the EDITOR variable to whichever editor you want.

Re: [SOLVED] Crontab will not Edit with Vim

Posted: 18. Sep 2017, 04:31
by Atip
It seems my memory is as well becoming impaired. ;)

I should have remembered that it is evil elvis. :evil:

Solution as before change symlink @vi to vim. :D

Thanks for the tip!