Have you ever started writing a one-liner and half way in realized it was a bit more complex than you first thought?

If your shell is bash, next time that happens try ctrl-x ctrl-e.

It will take your current line and stuff it into the your default editor (export EDITOR=vim).