While using the command sudo apt edit-sources, accidentally chose vim instead of nano and don't know how to change it. I used sudo update-alternatives --config editor but it doesn't change the editor I use in the sudo apt edit-sources command.
Asked
Active
Viewed 1,436 times
2
AEM
- 1,166
LyingAmigo
- 21
/usr/bin/select-editor(it creates a file in HOME .selected_editor, if you delete it you will get to choose again) – Jul 11 '21 at 09:57apt-get --reinstall install sensible-utilswill give youselect-editorback, run it to get the menu. – Jul 11 '21 at 12:28Dir::Bin::Editoras default editor, which defaults tosensible-editor, this is a shell wrapper trying to make sense of which editor to use if neither EDITOR nor SELECTED_EDITOR is setsensible-editorwill try to startselect-editorwhich creates and sources the file~/.selected_editorbefore calling the selected editor, I think the order is $VISUAL, $EDITOR, $SELECTED_EDITOR and last editor. – Jul 11 '21 at 12:49nanois last – Jul 11 '21 at 12:55