On 10/1/2009 10:44 AM, Arthur D. wrote:
I just installed VIM with emerge, and removed nano because I considered
it to be absolutely unnecessary in my system. Why I need nano? I am a VIM
fan. And here the troubles begin...
Run "sudo visudo" and you get this:
~ $ sudo visudo
visudo: no editor found (editor path = /bin/nano)
~ $ env | grep -i edit
EDITOR=/usr/bin/vim
You have two options:
1. Tell sudo to preserve the EDITOR variable in /etc/sudoers:
Defaults env_keep += "EDITOR VISUAL PAGER"
Otherwise sudo will ignore your environment and use the defaults for the
new user.
2. Change the default editor on your system by putting something in
/etc/env.d:
apollo ~ # cat /etc/env.d/99editor
EDITOR="vim"
--Mike