Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

Try this:

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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