Zsh: start new prompt in command mode (vi mode)

command linezsh

Is there a way to start each new prompt in Vi "command mode" instead of "insert mode". I do not want to press Esc every time.

Best Answer

The solution to this is actually found in the zshzle (or zshall) manual:

zle-line-init() { zle -K vicmd; }
zle -N zle-line-init

This will always put the command line into Vi command mode for each new prompt.

Related Question