I just discovered that Control + X + E opens a text editor in the Terminal that allows me to edit the most recent command before executing it again (I think it is actually a bash thing).
However, the editor that gets opened is always Emacs. How can I change it to vim?
Best Answer
Simply set the
EDITOR
variable tovim
in your bash startup file.From the
bash
manual