Question

I've just started using ConqueTerm for Vim this morning. It's pretty cool; however, it's not working as I hoped. I have the following set inside my .bashrc

bind '"\e[5~": history-search-backward'
bind '"\e[6~": history-search-forward'

This allows me to press PageUp and PageDown while typing commands in bash to automatically search the command history.

However, it doesn't work with ConqueTerm in vim. Tab completion, colours etc. all work, but when I press page up, it literally does a page up

I tried putting the following lines in my vimrc, but that didn't work.

imap [5~ <PageUp>
imap [6~ <PageDown>

Is there any way to fix this?

Was it helpful?

Solution

Bind is a built-in command. It is nothing to do with vim. PgUp and PgDown is used by vim on the most usual way, and You cannot show command history in vim. Actually You can, but it seems to be pointless to me.

If I know well the best place for key-bindings for is the ~/.inputrc file. I added your lines to it

"\e[5~": history-search-backward
"\e[6~": history-search-forward

And it works well! But the "standard" way is the up and down arrow for these.

Please describe what is your goal!

ConqueTerm interprets "\e" (escape) before bash does. This is why this would not work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top