Here is the debian way to make this change without breaking the system:
sudo update-alternatives --config editor
Discussion