When issuing crontab -e as root , i always got messages like the following (partial) , however , executing vim directly doesn't have problems at all.
$EDITOR was set to vim in /root/.bash_profile already.
%> sudo crontab -e
Error detected while processing /root/.vimrc:
line 2:
E319: Sorry, the command is not available in this version: autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e
line 20:
E319: Sorry, the command is not available in this version: autocmd VimEnter * set vb t_vb=
line 57:
E518: Unknown option: autochdir
line 65:
E319: Sorry, the command is not available in this version: syn on
line 78:
E538: No mouse support: mouse=a
line 79:
E319: Sorry, the command is not available in this version: filetype plugin indent on
line 87:
E319: Sorry, the command is not available in this version: funct! CommentBlock(comment)
line 88:
sudo -i crontab -e– daisy Oct 16 '11 at 15:48$ sudo -ifollowed by$ crontab -efollowed by choosing yr editor of choice ? It seems that loading root's.bashrcwhen invokingsudo + cmdshould be accessible to permanent configuration. Should not there be at least an option for that ? – Cbhihe Jan 12 '16 at 10:01sudo -i crontab -eis exactly the command I was looking for, thanks – cryptarch Oct 20 '23 at 00:00