Reputation: 1469
In bash, adding the lines
"\e[B": history-search-forward
"\e[A": history-search-backward
to my .inputrc, allows me to search the history for expressions that begin with the characters in front of my cursor by using the <page-up>
/<page-down>
keys.
Can I achieve something similar in vim?
I already know about the possibility of opening a history window with q:
and performing even complex searches there, but I am looking for a simple solution for the simplest case of history search.
Thank you!
Upvotes: 1
Views: 56
Reputation: 172520
This is built-in as <Up>
and <Down>
.
Of course, you can customize this, e.g.:
:cnoremap <PageUp> <Up>
Upvotes: 5