Created
May 24, 2012 21:39
-
-
Save Osse/2784399 to your computer and use it in GitHub Desktop.
Vi mode indicator for ZSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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