The history reverse search that I have used for year with zsh doesn't seem to work when I use prezto, do I need to do something funny here?
Tom, not long ago someone else had a similar issue. It turned out that
his environment had Ctrl + R assigned to another function.
Sorin suggested to run bindkey -L to list all keybindings in your
environment.
You can further simplify by running:
bindkey -L | grep -i "\^r"
That will filter for any bindkey that contains Ctrl + R
Hope this helps.
Somehow its bound to redisplay, which is odd because by default zsh binds ctrl+r to history search
If I run zsh without any special .zshrc config I get...
bindkey -L | grep "\^R"
bindkey "^R" history-incremental-search-backward
So why would prezto decide to change that to redisplay?
Edit:
I think I figured out what the deal was, its because for the first time ever I was using the vi line editing keybindings (which I've always been meaning to use) and that appears to change the zsh ctrl+r binding.
I am not sure why this happens for some users, I am not very experienced
with bash so I don't know how to continue "debug" to locate the origin
of this issue. Perhaps Sorin might share some advice as it maybe be
useful to include in the documentation.
Duplicate of #596.
after commenting out vi keybindings in .zpreztorc it started working for me:
# zstyle ':prezto:module:editor' key-bindings 'vi'
You can change vi to emacs.
This is where it is overrided in favor of redo.
I will rebind it back to the original since I don't use redo a lot and typing ? in normal mode is kind of a pain apparently.
https://github.com/sorin-ionescu/prezto/blob/master/modules/editor/init.zsh#L271
Most helpful comment
after commenting out vi keybindings in .zpreztorc it started working for me: