Skip to content

Instantly share code, notes, and snippets.

@raven-rock
Created July 31, 2018 13:18
Show Gist options
  • Save raven-rock/4fc8152f91eedf663755b65432f48ce5 to your computer and use it in GitHub Desktop.
Save raven-rock/4fc8152f91eedf663755b65432f48ce5 to your computer and use it in GitHub Desktop.
Zsh: Use `C-x C-e` or `C-x e` to edit current command in $EDITOR with multi-line support. Saving and quitting $EDITOR returns to command prompt with the edited command inserted (but does not execute it until you press enter). Handy!
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^xe' edit-command-line
bindkey '^x^e' edit-command-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment