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-utils
will give youselect-editor
back, run it to get the menu. – Jul 11 '21 at 12:28Dir::Bin::Editor
as 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-editor
will try to startselect-editor
which creates and sources the file~/.selected_editor
before calling the selected editor, I think the order is $VISUAL, $EDITOR, $SELECTED_EDITOR and last editor. – Jul 11 '21 at 12:49nano
is last – Jul 11 '21 at 12:55