jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.08k stars 107 forks source link

no state mode in prompt line with oh-my-zsh and powerlevel10k #128

Open jerome-diver opened 2 years ago

jerome-diver commented 2 years ago

General information

Basic examination

tty from ssh access on FeeBSD-12.2 zsh used with Oh-my-zsh and antigen (installed from freebsd packages) zsh-5.8 add to oh-my-zsh as indicated (and also before from antigen pugin) with git cone inside ZSH_CUSTOM (plugins recognized by ohmyzsh)

Problem description

From my ohmyzsh powerlevel10k prompt shell, i can not see any zsh-vi-mode indication of state mode (normal mode/insert mode/replace mode, etc...). But the plugin is working... i should miss a point to configure ohmyzsh or maybe powerlevel10k (as i can not see any powerlevel10k indication).

Reproduction steps

  1. install the plugin from antigen
  2. clone it on oh my zsh custom directory
  3. enable the plugin in .zshrc

Expected behavior

see in the prompt line somewhere the zsh-vi-mode mode state

jeffreytse commented 2 years ago

Hi @jerome-diver

Thanks for the issue, actually, the vi mode state should be supported by your theme, but this plugin has also provided several aspects for you to configure your custom prompt of vi mode state, you can refer to here.

Here are some examples for you:

Thanks and Regards

jerome-diver commented 2 years ago

Hi @jeffreytse and thank you for your help. Actualy, i read amll examples and i can not figure how to config my .p10k file to get a segment to show a zsh-vim-mode event status change. the configuration is inside powerlvele10k zsh file and there is a "example" segment able to print a segment (but this one only operate at prompt build time, then after to RETURN a command. I try to use the event zsh-vi-mode cfunction in both my .zshrc and .p10k file without any success (the segment is still not returned at event time, not sure if the function is working out of .zshrc file.

My ZSH script knowledge is not enough to undertstand good how it is working, so i'm locked. There is, inside powerlevel10k plugin theme, a 'vi-mode' segment existing (this one reflect only vi-mode as normal or insert or visual, not replace mode or any other.

jeffreytse commented 2 years ago

Hi @jerome-diver

Thanks for your patience, I understand your concern, and I will take a look as soon as possible.

Thanks and Regards

jerome-diver commented 2 years ago

@jeffreytse thank you

jerome-diver commented 2 years ago

@jeffreytse sorry but it's working now with the vi-mode of powerlevel10k activated. (insert mode only show nothing, i think it is the normal design).

jeffreytse commented 2 years ago

@jerome-diver It's great to hear your good news. Don't hesitate to tell me if you got stuck in any issues.

wxh06 commented 1 month ago

REPLACE mode still not showing properly in Powerlevel10k v1.20.0

Mode Behavior Working as expected
INSERT 截屏2024-07-30 08.36.44.png yes
NORMAL 截屏2024-07-30 08.29.51.png yes
REPLACE 截屏2024-07-30 08.30.06.png no
VISUAL 截屏2024-07-30 08.30.02.png yes