fzf ctrl+r doesn't work anymore after I started to use zsh vi-mode. My zshrc file is here:
function zvm_config() {
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
ZVM_VI_INSERT_ESCAPE_BINDKEY=jk
}
source /opt/homebrew/opt/zplug/init.zsh
zplug "jeffreytse/zsh-vi-mode"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load --verbose
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
If I separately run source ~/.fzf.zsh then it will work.
Adding this command to .zshrc solved this issue for me.
ZVM_INIT_MODE=sourcing
Source: https://github.com/jeffreytse/zsh-vi-mode#initialization-mode
fzf keybindings seem to conflict with vi-mode. As mentioned here, Loading the fzf key bindings after loading the vi-mode plugin is one way to work around this issue. In my case, I was using oh-my-zsh and adding the fzf plugin after vi-mode in the plugins list fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With