zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

Conflict with zaw

Open wolfo opened this issue 2 years ago • 1 comments

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

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.

wolfo avatar Apr 05 '22 15:04 wolfo

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
}

JerAguilon avatar Jan 17 '24 19:01 JerAguilon