How to enable reverse search in zsh

command historyvizsh

I recently switched to zsh (finally) and am loving it! So far one thing that I am missing is Ctrl+R to do incremental history search.
I have the history set up properly

HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.zsh_history

and I used vi key bindings

bindkey -v

But Ctrl+R does not work. It removes the line above the current line, which is not the behavior it should have in vim either.

Any suggestions?

Best Answer

If I recall correctly, you need to explicitly set it, even with bindkey -v. Use something like this:

bindkey -v
bindkey '^R' history-incremental-search-backward
Related Question