Sudo edit
Run sudo update-alternatives --config editor Choose desired editor from the (text-mode) menu. If you don't see the editor you want, you probably need to install it; cancel, do that, and repeat. sudo visudo should now open the editor of your choice.