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

[ Help needed ]/Feature request: add more vim mode indicators #552

Open
BachoSeven opened this issue Jul 6, 2020 · 0 comments
Open

[ Help needed ]/Feature request: add more vim mode indicators #552

BachoSeven opened this issue Jul 6, 2020 · 0 comments

Comments

@BachoSeven
Copy link

BachoSeven commented Jul 6, 2020

Hi, I have been enjoying this theme's vi-mode; and tried to implement indicators for Visual and Replace mode, using ideas from this config and using the syntax from this suggestion; which is the same implemented in prompt_pure_update_vim_prompt_widget() in this theme's code.

I have been struggling to get the zsh nested parameter substitiution to work; would appreciate any tips. Here is what I have come up with at the moment:

prompt_pure_update_vim_prompt_widget() {
	setopt localoptions noshwordsplit

	prompt_pure_state[prompt]=${${${${KEYMAP/virep/${PURE_PROMPT_VIREP_SYMBOL:-▶}}/(vivis|vivli)/${PURE_PROMPT_VIVIS_SYMBOL:-V}}/vicmd/${PURE_PROMPT_VICMD_SYMBOL:-❮}}/(main|viins)/${PURE_PROMPT_SYMBOL:-❯}}

	prompt_pure_reset_prompt
}

Essentially I was trying to implement a case statement inside the substitution...

If this is doable in such a way, I would do a PR as it seems like a cool feature to implement; p10k have it already but I had no luck in trying to understand how they do it (reference).
I have tried p10k's implementation of pure; but it also has no replace&visual indicators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant