I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim
I have exported both variables
EDITOR to vim for normal user and for root. And this works – when I type
crontab -e as normal user or root, crontab runs vim for editing.
sudo crontab -e opens nano.
sudo echo $EDITOR (or
vim int output.