Doing visudo you get nano instead of your favorite text editor?
Mine is vim therefore I issue:
DEBIAN/UBUNTU way
# update-alternatives --config editor
There are 4 alternatives which provide `editor'.
Selection Alternative
-----------------------------------------------
1 /usr/bin/vim.tiny
2 /bin/ed
*+ 3 /bin/nano
4 /usr/bin/vim.basic
Press enter to keep the default[*], or type selection number:
Selecting 4 I’m ready to use my full syntax colors when I edit any file.
OTHER DISTROS
Edit your .bashrc file and add the following:
EDITOR=vim
export EDITOR
Next login you will have your VIM working.
If you want to have it immediately and only for this session just type
# export EDITOR=vim
and press enter.
Last 5 posts by Luca
- How to enable SSH key Authentication: SSH login without a password! - September 3rd, 2009
- How to install Debian from USB drive - August 30th, 2009
- How to change the file timestamp on Linux - August 29th, 2009