Nano is the default editor in ubuntu. This is how to change it to your preferred editor.

sudo update-alternatives --config editor

Choose preferred editor:


There are 4 alternatives which provide `editor’.

Selection Alternative
———————————————–
1 /bin/ed
2 /usr/bin/vim
*+ 3 /bin/nano
4 /usr/bin/emacs21

Press enter to keep the default[*], or type selection number: 2

Advertisements