jeffreytse / zsh-vi-mode

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

zsh-vi-mode overwrites my personal bindkey customizations #112

Closed haberdashPI closed 3 years ago

haberdashPI commented 3 years ago

General information

Basic examination

Problem description

Calls to bindkey in .zshrc do not work in normal or insert mode after installing zsh-vi-mode.

Reproduction steps

  1. Add a bindkey statement to zshrc after calling source $ZSH/oh-my-zsh.sh (e.g. bindkey '\e;' autosuggest-accept with zsh-autosuggestions installed.
  2. Try to use the bound key
  3. The bound key will not register

Expected behavior

I should be able to customize key combinations with bindkey somewhere in my zshrc script and zsh-vi-mode should not override them. (Specifically, I would expect insert mode to leave most keybindings untouched).

haberdashPI commented 3 years ago

I would note, although the README does explain something about using "zvm_bindkey " there is not a very good working minimal example of how to set this up if all I want to do is make sure my existing keybindings work in insert mode. (There's something about widgets, which I don't really care about).

jeffreytse commented 3 years ago

Hi @haberdashPI

Thanks for the issue. I think this is an issue about overwriting keys, and you can check issue #24 at first. And welcome to get back here for next step.

Thanks and regards

haberdashPI commented 3 years ago

Thanks for directing me there: might be worth changing the title there to identify it as a more general problem.

jeffreytse commented 3 years ago

Is it that you want to bind ESC + ; to the widget autosuggest-accept, but not working?

haberdashPI commented 3 years ago

That was the original issue yes. With the fix mentioned in #24, this now works.

jeffreytse commented 3 years ago

@haberdashPI That's great, to hear that you have solved this problem smoothly.