You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using vi mode as my editor mode in zsh (bindkey -v).
Normal pormpts (part of oh-my-zshell or prezto) are implemented in zsh and they are taking advantage of zle-keymap-select and changing part of the prompt based on $KEYMAP variable.
function zle-line-init zle-keymap-select {
RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
RPS2=$RPS1
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
I'd like to know which vi mode (insert or command) am I using. Any idea how I could implement this feature in powerline-go? I could probably use the function zle-keymap-select to change the RPS1 command or set some environment variable and then call zle reset-prompt. What do you think?
The text was updated successfully, but these errors were encountered:
I'm using vi mode as my editor mode in zsh (
bindkey -v
).Normal pormpts (part of oh-my-zshell or prezto) are implemented in zsh and they are taking advantage of
zle-keymap-select
and changing part of the prompt based on$KEYMAP
variable.This is very simple example:
I'd like to know which vi mode (insert or command) am I using. Any idea how I could implement this feature in
powerline-go
? I could probably use the functionzle-keymap-select
to change theRPS1
command or set some environment variable and then callzle reset-prompt
. What do you think?The text was updated successfully, but these errors were encountered: