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

CTRL+R is overwritten

Open gabyx opened this issue 1 year ago • 4 comments

General information

Please report the following information as possible as you can:

  • Terminal program: tmux 3.2a (screen)
  • Operating system: Linux (5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 GNU/Linux)
  • ZSH framework:
  • ZSH version: zsh 5.8.1 (x86_64-ubuntu-linux-gnu)
  • ZVM version: zsh-vi-mode 0.10.0

Basic examination

  • [x] I have read through the README page
  • [x] I have the latest version of zsh-vi-mode
  • [ ] I have tested with another terminal program (not applicaple)

Problem description

Some how binding CTRL+R gets overwritten when the plugin is loaded, but this is not mentioned in the readme (?).

This is especially the case when first loading the z-shell/zsh-navigation-tools

Reproduction steps

  1. Use antidote and load first this plugin then immediately after the z-shell/zsh-navigation-tools.
  2. CTRL+R should open up the n-history widget. But instead the normal history bck-i-search is done.

Expected behavior

CTRL+R is not overwritten or reset?

Of course the behavior can be disabled with local ZVM_INIT_MODE=sourcing when first loading this plugin. I am just confused why this overwrite happens?

gabyx avatar Sep 13 '23 21:09 gabyx

Hi @gabyx,

Thanks for your issue, I think your problem is similar to #15 as the reason mentioned in README. You can load your specific plugin after zsh-vi-mode is initialized aspect as below.

function zvm_after_init() {
   source "<your_plugin_folder>/zsh-navigation-tools.plugin.zsh"
}

or

function zvm_after_init() {
   zvm_bindkey viins '^R' znt-history-widget
}

Thanks & Regards

jeffreytse avatar Sep 15 '23 10:09 jeffreytse

Thanks a lot.BR

gabyx avatar Sep 15 '23 15:09 gabyx

I have a similar issue, I was using fzf plugin for the nice history search widget, after installed zvm, I find that when I do Ctrl+R in normal mode, it gives me fzf as before, but in insert mode, it gives me the primitive bck-i-search: prompt.

yihuang avatar Feb 21 '24 01:02 yihuang