настройка редактора для crontab -e, почему всегда используется базовый vim?

При выдаче crontab -e как root я всегда получал сообщения вроде следующего (частичного), однако, выполнение vim напрямую не имеет проблем вообще. $EDITOR уже было установлено на vim в /root/.bash_profile.

%> 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:
2
задан 16 October 2011 в 19:01

2 ответа

Когда вы используете «команду sudo», профиль пользователя root не загружается, вместо этого используйте sudo -i и crontab -e.

0
ответ дан 16 October 2011 в 19:01

в Ubuntu-14.04 используйте select-editor, выберите «vim-gnome», но не «vim-basic»

0
ответ дан 16 October 2011 в 19:01

Другие вопросы по тегам:

Похожие вопросы: