Linux Crontab定时任务

Linux Crontab定时任务

crontab -e报错:

Error detected while processing /home/work/.vimrc:
line   20:
E518: Unknown option: cursorline
line   58:
E107: Missing braces: vundle#rc()
line   59:
E492: Not an editor command: Bundle 'Lokaltog/vim-powerline'
line   60:
E492: Not an editor command: Bundle 'tomtom/tlib_vim'
line   61:
E492: Not an editor command: Bundle 'flazz/vim-colorschemes'
line   62:
E492: Not an editor command: Bundle 'MarcWeber/vim-addon-mw-utils'
line   63:
E492: Not an editor command: Bundle 'garbas/vim-snipmate'
line   64:
E492: Not an editor command: Bundle 'kien/ctrlp.vim'
line   65:
E492: Not an editor command: Bundle 'Lokaltog/vim-easymotion'
line   67:
E492: Not an editor command: Bundle 'tpope/vim-surround'
line   68:
E492: Not an editor command: Bundle 'tristen/vim-sparkup'
line   69:
E492: Not an editor command: Bundle 'scrooloose/nerdtree'
line   70:
E492: Not an editor command: Bundle 'vim-scripts/Colour-Sampler-Pack'
line   71:
E492: Not an editor command: Bundle 'pangloss/vim-javascript'
line   73:
E492: Not an editor command: Bundle 'L9'
line   74:
E492: Not an editor command: Bundle 'FuzzyFinder'
line   75:
E492: Not an editor command: Bundle 'taglist.vim'
line   78:
E492: Not an editor command: Bundle 'git://git.wincent.com/command-t.git'
Hit ENTER or type command to continue
crontab: no changes made to crontab

单独使用vim编辑文件时并没有如此错误提示。

解决方案

由于单独使用vim时并没有如此错误,怀疑默认的编辑器并非vim,利用echo $EDITOR查看默认的编辑器结果为空,因此设置默认的编辑器为vim.

编辑~/.bashrc,在末尾添加export EDITOR=vim,然后执行source ~/.bashrc,然后在运行以上的如crontab -e 或者less命令错误提示没有出现,问题解决。

备注

如果单独使用vim就出现以上错误提示,可能原因没有安装Vundle插件管理,可以通过git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim安装。如果已经安装Vundle插件管理,仍然出现以上错误提示,可能是没有运行相关命令安装对应插件导致,可以通过在vim中运行:BundleInstall来解决该问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值