Backward search in vi-mode

Nils Riedemann picture Nils Riedemann · Jun 27, 2010 · Viewed 11.2k times · Source

I just discovered the possibility to use vi-mode in zsh. Pretty awesome. But I used CTRL-r in emacs-mode pretty much and really really miss it. Is there something alike or can I get that functionality in vi-mode as well?

Answer

ZyX picture ZyX · Jun 27, 2010

You can bind history-incremental-search-backward to any key, for example:

bindkey -M vicmd '?' history-incremental-search-backward