I use vim for essentially all my editing needs, so I decided to once again try vi-mode for my shell (currently ZSH w/ oh-my-zsh on OS X), but I find myself trying (and failing) to use Ctrl-R constantly. What's the equivalent key-binding? And for future reference, how would I figure this out myself? I'm pretty sure I could use bind -P in bash.
How do I perform a reverse history search in ZSH's vi-mode?
zsh;command history;vi mode
You can run bindkey with no arguments to get a list of existing bindings, eg:# Enter vi modechopper:~> bindkey -v# Search for history key bindingschopper:~> bindkey | fgrep history^[OA up-line-or-history^[OB down-line-or-history^[[A up-line-or-history^[[B down-line-or-historyIn emacs mode, the binding you want is history-incremental-search-backward, but that is not bound by default in vi mode. To bind Ctrl-R yourself, you can run this command, or add it to your ~/.zshrc:bindkey ^R history-incremental-search-backwardThe zshzle manpage (man zshzle) has more information on zsh's line editor, bindkey, and emacs/vi modes.