If you are working with a long command in your terminal and want to edit parts of it,
Ctrl+X followed by a
Ctrl+E (don’t lift your finger from
Ctrl between them) will open the command you are currently editing into the program specified in your
$EDITOR environment variable. Tested on zsh and heard that it works on bash too.
Thanks to my colleague Harsh for this tip.