How to bind up arrow in ~/.inputrc (readline) for vim insert mode?
- by Pawel Goscicki
When in Readline apps with vim mode enabled in ~/.inputrc (set editing-mode vi) is there a way to bind the up arrow key? To previous history, for example. It seems I have to press ESC key first, only then it works.
Here's my attempt at making it work (~/.inputrc):
$if mode=vi
# INSERT MODE
set keymap vi-insert
"\e[A": history-search-backward # up-arrow
"\e[B": history-search-forward # down-arrow
Also note, that when I press Ctrl+v and then <Up>, it prints ^[[A.