LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1730|回复: 7

crontab -e能否用vim编辑器?

[复制链接]
发表于 2005-6-20 21:13:10 | 显示全部楼层 |阅读模式
默认的elvis编辑器太难用了,删个字母都不行
发表于 2005-6-20 22:17:00 | 显示全部楼层
elvis实际上是vi的clone之一,删除字母这种操作应该和vi是一致的吧。
你可以用喜欢的编辑器编辑一个文件,然后用 crontab filename 这个命令替换当前的crontab
回复 支持 反对

使用道具 举报

发表于 2005-6-20 22:38:26 | 显示全部楼层
export EDITOR=vim
crontab -e
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 11:13:56 | 显示全部楼层
Post by mars_diy
export EDITOR=vim
crontab -e

这样做不行
回复 支持 反对

使用道具 举报

发表于 2005-6-21 11:24:37 | 显示全部楼层
man crontab  
       -e option is used to edit the  current  crontab  using  the  editor
       specified  by  the  VISUAL  or EDITOR environment variables.  After you
       exit from the editor, the modified crontab will be installed  automati-
       cally.

设置export EDITOR=vim 不行吗?
回复 支持 反对

使用道具 举报

发表于 2005-6-21 12:26:01 | 显示全部楼层
ln -sf vim vi?????
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 14:53:55 | 显示全部楼层
Post by kissingwolf
man crontab  
       -e option is used to edit the  current  crontab  using  the  editor
       specified  by  the  VISUAL  or EDITOR environment variables.  After you
       exit from the editor, the modified crontab will be installed  automati-
       cally.

设置export EDITOR=vim 不行吗?

man crontab
       Generally  the  -e option is used to
       edit your crontab.  crontab will use  /usr/bin/vi  or  the
       editor  specified  by  your VISUAL environment variable to
       edit the crontab.
我用slack10.1,设VISUAL=vim就可以了,EDITOR不行。
又发现,设好后,crontab -e无法保存了,好奇怪呀
回复 支持 反对

使用道具 举报

发表于 2005-6-21 23:58:34 | 显示全部楼层
EDITOR Determine the editor to be invoked when the -e option is specified.  The default edi-
              tor shall be vi.

default 是 vi 的说。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表