# Edit the command line using your usual editor. # Binding this to '!' in the vi command mode map, # autoload -Uz edit-command-line # zle -N edit-command-line # bindkey -M vicmd '!' edit-command-line # will give ksh-like behaviour for that key, # except that it will handle multi-line buffers properly. emulate -L zsh local prebuffer # see below comment for why this is needed if (( ! ZLE_RECURSIVE )); then prebuffer=$PREBUFFER fi () { exec