1

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!

4

1 回答 1

5

这是内置的<Up><Down>

当然,您可以自定义它,例如:

:cnoremap <PageUp> <Up>
于 2013-01-23T16:09:13.150 回答