ohmyzsh: "^r" search not working
For me the search is not working unless I manually do
source ~/.zshrc
I have no idea why it is that way but actually the second line in key-bindings.zsh does not make any sense to me.
I already commented on the commit but no one noticed.
Please fix that as searching already executed commands is a very useful feature.
About this issue
- Original URL
- State: closed
- Created 13 years ago
- Comments: 17 (15 by maintainers)
Commits related to this issue
- remove vi-mode plugin, was causing issues see https://github.com/robbyrussell/oh-my-zsh/issues/635 — committed to jlintern/dotfiles by jlintern 10 years ago
- [Fix #635] Use $BROWSER to open node documentation — committed to ericlake/oh-my-zsh by sorin-ionescu 10 years ago
The vi-mode plugin switches the key bindings to vi-mode from the default emacs-mode, search for the following line:
Thus you need to use the vi search commands and not the emacs ones…
ESCputs you in command mode (from the default vi insert mode) and the?starts a backward search, while/starts the forward search. You can then usento find the next search match.But the big difference is that this isn’t an incremental search, you have to type the whole search string and then
ENTERbefore you see if there is a match.To restore the
^Rincremental search add the following to the bottom of your.zshrcfile:(note if you are typing that from the command line you’ll need to escape the
\with an extra\.thanks to everyone on this thread, was very concerned when C-R spontaneously stopped working
at least on my system, i needed a slightly different syntax
bindkey "^R" history-incremental-search-backwardnot sure why, but the following didn’t work for me
bindkey \C-R history-incremental-search-backwardsystem is mac os x 10.14 (el capitan)