Ubuntu provides us some text editors such as Nano, Vim, …and one of them is set as a default editor. However, you can change the default editor by using this command
sudo update-alternatives –config
After that you enter a number to select the editor which you love. I usually use vim as my text editor.