Skip to content

Instantly share code, notes, and snippets.

@Osse
Created May 24, 2012 21:39
Show Gist options
  • Save Osse/2784399 to your computer and use it in GitHub Desktop.
Save Osse/2784399 to your computer and use it in GitHub Desktop.
Vi mode indicator for ZSH
# Mode indication {{{
function zle-line-init zle-keymap-select {
RPS1="%B${${KEYMAP/vicmd/n}/(main|viins)/i}%b"
RPS2=$RPS1
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
setopt transient_rprompt
# }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment