So I know that you can set vi mode in bash with

set -o vi

I also know that you can set vi mode in zsh with

bindkey -v

The vi mode in bash has a great feature that allows you to edit the command you are currently working on in the full-out vim editor by pressing v.

Is there a way to edit the command like this in zsh?


Try this:

autoload edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
  • This works perfectly. Exactly what I was looking for. Thanks so much! – Matt Garriott May 8 '13 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.