Edit terminal command in Vim
Add this to bashrc/zshrc:
# Enables the edition of command lines!
# press cltr+x cltr+e to open the editor and fix any command line errors
autoload edit-command-line
zle -N edit-command-line
bindkey '^X^E' edit-command-line
Now in Bash/ZSH ctrl+x+e opens default editor (like vim) where you can prepare your command before executing.
Written by Celso Dantas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#