zsh-vi-mode
zsh-vi-mode copied to clipboard
zsh-vi-mode overwrites keybindings of oh-my-zsh plugins
General information
Basic examination
- [X] I have read through the README page
- [X] I have the latest version of zsh-vi-mode
- [X] I have tested with another terminal program
Problem description
zsh-vi-mode overwrites key bindings of oh-my-zsh plugins, such as fancy-ctrl-z
Reproduction steps
- install oh-my-zsh
- enable fancy-ctrl-z plugin
- CTRL-z does not work from terminal command line
Expected behavior
Hi @cridemichel
Thanks for your reporting, and I will work on this as soon as possible.
Thanks and Regards
thank you for your prompt reply!
Cristiano De Michele @.***
Il giorno 25 set 2021, alle ore 19:59, JT @.***> ha scritto:
Hi @cridemichel https://github.com/cridemichel Thanks for your reporting, and I will work on this as soon as possible.
Thanks and Regards
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreytse/zsh-vi-mode/issues/127#issuecomment-927159768, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4YGW7SD6M5GVOOUNJ2TTUDYEWTANCNFSM5EXNUFKA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi @cridemichel
I have tested the fancy-ctrl-z
plugin, but it works normally. Could you provide me some more details?
Thanks and Regards
Hi, with this minimalist .zshrc file: setopt HIST_FIND_NO_DUPS export PATH="/usr/local/opt/apr/bin:$PATH" export PATH="/usr/local/bin:/usr/local/sbin:$PATH" export ZSH="/Users/demichel/.oh-my-zsh" ZSH_THEME="agnoster" DISABLE_MAGIC_FUNCTIONS=true ENABLE_CORRECTION="true" plugins=(zsh-vi-mode fancy-ctrl-z) source $ZSH/oh-my-zsh.sh ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLOCK ZVM_VI_SURROUND_BINDKEY="classic"
if I open vim and I type CTRL-z, vim goes in background as expected but if I re-type CTRL-z, I get just a C-z on the command line and it does not switch back to vim. zsh version is 5.8
best Cristiano
Hi @cridemichel
Could you try this command bindkey -M viins | grep "\^Z"
, and paste the result to here?
Thanks and Regards
this is with zsh-vi-mode plugin loaded: ❯ bindkey -M viins | grep "^Z" "^Z" self-insert otherwise I get: ❯ bindkey -M viins | grep "^Z" "^Z" fancy-ctrl-z
@cridemichel Now you have one solution to settle this issue, try the below code snippet:
# The plugin will auto execute this zvm_after_init function
function zvm_after_init() {
zvm_bindkey viins '^Z' fancy-ctrl-z
}
I will take a further consideration on this issue except this solution.
I had a similar issue related to marlonrichert/zsh-autocomplete
plugin. It binds its search function to ^R
, which got overwritten by zvm:
% bindkey -M viins | grep '"^R"'
"^R" fzf-history-widget
The workaround given above (rebinding ^R
back to fzf-history-widget
in zvm_after_init
) fixed this for me as well.