Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

vi-history-incremental-search?



Hello,

I am using the vi keymap (bindkey -v).  I have these lines in my
.zshrc:

    bindkey -M vicmd "?" vi-history-search-backward
    bindkey -M vicmd "/" vi-history-search-forward

I really like the ability to see incremental searches, so I changed
this to:

    bindkey -M vicmd "?" history-incremental-search-backward
    bindkey -M vicmd "/" history-incremental-search-forward

Unfortunately, now "n" (vi-repeat-search) and "N" (vi-rev-repeat-
search) don't seem to work after the search is completed.  That is,
they don't perform the same search from that point in the history.

For example, with this history:

    ...
    100 echo foobar
    101 echo blah
    102 echo woofoo

When I use vi-history-search-backward to search for "foo" (matched at
102), I can use "n" (vi-repeat-search) to perform the same search
again (matched at 100).  But if I initially use
history-incremental-search-backward to search for "foo", then "n"
(vi-repeat-search) doesn't continue the search for "foo".

Is there any way to modify either vi-history-search-* or
history-incremental-search-* to come up with a hybrid
vi-history-incremental-search*?

Thanks,

Steve



Messages sorted by: Reverse Date, Date, Thread, Author