jeffreytse / zsh-vi-mode

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

Conflict with zaw #174

Open wolfo opened 2 years ago

wolfo commented 2 years ago

General information

Basic examination

Problem description

I prefer to use zaw for searching the history, but the up/down keybindings are overwritten, even when manually loading zaw after zsh-vi-mode.

Reproduction steps

  1. antigen bundle jeffreytse/zsh-vi-mode
  2. antigen bundle zsh-users/zaw

Alternative reproduction steps

  1. source .antigen/bundles/jeffreytse/zsh-vi-mode/zsh-vi-mode.plugin.zsh
  2. source .antigen/bundles/zsh-users/zaw/zaw.plugin.zsh

Expected behavior

Whichever plugin that is sourced last should overwrite keybindings, therefore zaw should take precedence if sourced last.

JerAguilon commented 6 months ago

This is an old issue, but in case somebody runs into this, the solution in https://github.com/jeffreytse/zsh-vi-mode/issues/242 worked.

I have:

function zvm_after_init() {
    # CTRL-R will pull up zaw-history (backwards zsh history search)
    bindkey '^r' zaw-history
    # CTRL-B will pull up zaw-git-branches which will search your current git branches and switch (git checkout) to the branch you select when you hit enter.
    bindkey '^b' zaw-git-branches
}