jeffreytse / zsh-vi-mode

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

fzf keybindings not working with zsh-vi-mode #137

Closed tummetott closed 2 years ago

tummetott commented 2 years ago

General information

Basic examination

Problem description

In my zshrc, i have the following command after the plugin definition with zgen: source /usr/local/opt/fzf/shell/key-bindings.zsh This enables key-bindings for fzf, so i can press e.g. CTRL-r and get the fzf command history search instead of the normal backward search. It's working perfect until I put the ZVM plugin in zgen's plugin list. However, when I run the source command as interactive command in my zsh, the keybinding is back.

Then I tried sourcing anything at the end of my zshrc -- it has no effect. Whenever I remove the plugin, the normal behaviour is back. Is it possible that the plugin somehow uses the CTRL-r shortcut?

EDIT: I realised, that i have the same problem with softmoth/zsh-vim-mode once I turn on mode sensitive cursor styling

Reproduction steps

  1. Download zgen: git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
  2. Install fzf with brew (or other plugin manager, then the path changes)
  3. Copy the following zshrc:
    source "${HOME}/.zgen/zgen.zsh"
    zgen load jeffreytse/zsh-vi-mode
    source /usr/local/opt/fzf/shell/key-bindings.zsh
  4. Restart terminal
  5. Press CTRL-r

Expected behavior

fzf history search pops up

Actual behavior

zsh's backward search pops up

jeffreytse commented 2 years ago

Hi @Tummetott

Please read issue #24, I think your issue could be solved perfectly.

Thanks and Regards

tummetott commented 2 years ago

Oh i'm so sorry. I thought I checked the issues. Thanks a lot! This plugin is amazing. Just starred it!

jeffreytse commented 2 years ago

@Tummetott You're welcome, hope you have a good day! : )