1 function zle-line-init zle-keymap-select {
2 local state="%#" timer_val="?"
3 [[ ${KEYMAP} == vicmd ]] && state="+"
4 [[ $timer ]] && timer_val=$(( $SECONDS - $timer ))
6 prompt+="%U${timer_val}%u|"
8 prompt+="%B%F{magenta}${state}%f%b "
13 zle -N zle-keymap-select
20 printf "\a\033]2;\033\\"