Changing the Default Editor in Ubuntu
To change the default text editor in the shell you can simply install your favorite editor then run the following command:
sudo update-alternatives --config editor
This command will present you with a menu of all the possible options.