Not too long ago I discovered ctrl-x-e (holding ctrl, press x then e) to pop open the command currently typed in your shell (bash and zsh; you may need to enable it in zsh) into your favourite text editor, whichever is set to $VISUAL or $EDITOR. I wish I had…