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

How can I get back the old history search behavior in insert mode?

Open jclsn opened this issue 2 years ago • 5 comments

General information

Please report the following information as possible as you can:

  • Terminal program: kitty
  • Operating system: Manjaro
  • ZSH framework: oh-my-zsh
  • ZSH version: 5.8
  • ZVM version: 13548af

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

When using the plugin, normal search behavior is gone. I mean that you can type sudo and then search all commands starting with sudo by hitting the up arrow key.

Reproduction steps

  1. Install oh-my-zsh
  2. Install ZVM
  3. See the different history searching behaviour in insert mode

Expected behavior

I would like the same behavior in insert mode as without zvm.

jclsn avatar Feb 05 '22 08:02 jclsn

Same here.

Great plugin, however this history thing is very annoying. Any plan to fix it or is there any workaround for the time being?

piotrraczynski avatar Feb 14 '22 09:02 piotrraczynski

I fixed it by ditching this plugin completely. Just add bindkey -v to your .zshrc and you will have almost the same functionality.

jclsn avatar Feb 14 '22 16:02 jclsn

Thanks @jclsn. I had the same issue. I added bindkey -v to my .zshrc and it works like a charm.

suchmaske avatar Feb 16 '22 08:02 suchmaske

Hi @piotrraczynski @jclsn

Sorry for the late reply, as currently I'm quite busy. Related to issue #12, for the old history behaviors, you can manage to fix this behavior by adding the following at the end of my .zshrc as below code snippet:

zvm_after_init_commands+=("bindkey '^[[A' up-line-or-search" "bindkey '^[[B' down-line-or-search")

Thanks & Regards

jeffreytse avatar Feb 16 '22 14:02 jeffreytse

@jeffreytse No worries. Just merge this when you find the time :)

jclsn avatar Jun 06 '22 09:06 jclsn