jeffreytse / zsh-vi-mode

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

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

Open jclsn opened 2 years ago

jclsn commented 2 years ago

General information

Please report the following information as possible as you can:

Basic examination

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.

piotrraczynski commented 2 years ago

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?

jclsn commented 2 years ago

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

suchmaske commented 2 years ago

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

jeffreytse commented 2 years ago

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

jclsn commented 2 years ago

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