Debian etch by default providing the nano editor as an editor.
But since i’m more familiar with vim rather than with nano i change its default editor.
After googling, i found the simples way

As a root (administrator), it just only executing one command

debsux:~# update-alternatives –config editor

There are 3 alternatives which provide `editor’.

Selection Alternative
———————————————–
1 /bin/ed
*+ 2 /bin/nano
3 /usr/bin/vim.tiny

Press enter to keep the default[*], or type selection number: 3
Using `/usr/bin/vim.tiny’ to provide `editor’.
debsux:~#

But if only as a user and want to changing the default editor just define the environment variable EDITOR.
Give the following lines in profiles

EDITOR=vi
export EDITOR
alias editor=$EDITOR