Something I learned recently from reading HN comments.
If you're writing a command in Bash, you can actually edit it in VIM (or whatever you have set as $EDITOR in .bashrc).
While writing the command in your terminal, type <ctrl>-x and then <ctr>-e and your editor will open with the already written command text in it.
Once you're done, exit VIM (left as an exercise for the reader), and your command will execute.
Thanks, that's cool. I did find myself wanting to go back to the default mode because <ctrl>-c doesn't clear the terminal.
set -o emacs appears to do the trick (I remember someone saying that the Bash CLI has emacs bindings by default).
@jcbrand unless you have readline set to use vim mode, in which case you just go to normal mode and press "v".
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!