In this case, when update-alternatives does not work, try select-editor instead.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to vim in Ubuntu. https://bugs.launchpad.net/bugs/372588 Title: sudo crontab -e uses wrong vi version Status in vim package in Ubuntu: Invalid Bug description: Binary package hint: vim When editing sudo's crontab using 'sudo crontab -e' ubuntu does not use vim which is set as the default $EDITOR What was tried: ---------------------- Method-1: /home/<user>/.bashrc has export EDITOR=/usr/bin/vim This works when I do crontab -e but not when sudo crontab -e Method-2: 1. Removed EDITOR environment variable from /home/<user>/.bashrc 2. And tried sudo update-alternatives --config editor There are 5 alternatives which provide `editor'. Selection Alternative ----------------------------------------------- 1 /usr/bin/vim.tiny 2 /bin/ed 3 /bin/nano 4 /usr/bin/vim.basic *+ 5 /usr/bin/vim.gnome Again, this works when I do crontab -e but not when sudo crontab -e. I tried 1, 4 and 5. No dice. Method-3: sudo EDITOR=vim crontab -e works. But why should I prefix the command with the environment variable everytime I run it. It should pick the editor as set in Method-1 and Method-2. What is expected to happen: 'sudo crontab -e' should open the crontab using the default system $EDITOR without much fuss. More info: http://ubuntuforums.org/showthread.php?t=1075667 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/vim/+bug/372588/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp