It appears sudo doesn't source root's preferences. To fix:

First, make sure that vim is set as root's EDITOR by placing this in 
/root/.bashrc
    export EDITOR=/usr/bin/vim

Now, use the -E switch to tell sudo to use root's environment variables, i.e. 
to source /root/.bashrc. So your command should look like this:
    sudo -E crontab -e

If you wanted to, you could create an alias in your user's .bashrc
    alias sudo="sudo -E"

-- 
 sudo crontab -e uses wrong vi version
https://bugs.launchpad.net/bugs/372588
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to