Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for keymap highlighting #14

Open
viktomas opened this issue Aug 25, 2017 · 0 comments · May be fixed by #23
Open

Support for keymap highlighting #14

viktomas opened this issue Aug 25, 2017 · 0 comments · May be fixed by #23

Comments

@viktomas
Copy link

viktomas commented Aug 25, 2017

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:

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?

@viktomas viktomas linked a pull request Aug 30, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants