I am using Ubuntu 18.04. The default text editor now appears to be nano. I want to set it to always be vi. Other posts suggest the following command, however this command does not list the vi I want to use.
$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 15 manual mode
I want to use the following:
$ which vi
/usr/bin/vi
How do I set the default editor?
/usr/bin/vi
actually is?