Hi,

On Sat, Sep 14, 2024 at 06:12:02AM +0800, Marcus Park wrote:
> either $EDITOR or $VISUAL in my system is empty.
> 
> And /usr/bin/editor points to nano.

Well, I do not really understand what is going on then as you are
definitely running an editor that looks at vim config files, and
nano won't do that.

I assume you are looking at the environment of the same user that is
executing "crontab -e"?

When the editor from "crontab -e" is running, you could go into
another terminal and look at all your processes to see which actual
binary is being called. IIRC, vim when invoked as vi, acts in vi
compat mode and that may be why it can't parse its own system
config. Although still it is a mystery to me why you do not get
nano.

I just ran crontab -e as a fresh user and it actually invoked
/usr/bin/sensible-editor and asked me which editor I wanted to use
(now and in future). So perhaps the man page for crontab is out of
date. It seems that sensible-editor records this choice in
~/.selected_editor. Is this what got called for you? If so,
apparently running "select-editor" will change the choice.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to