When I switch to vi mode in shell (bash or ksh) very useful to me shortcuts such as C-p and C-n to go back and forth in command history disappear. I don't want to rely on Up and Down for that. I don't want to add key bindings every time for every shell. I just want to know if there's alternative native Vi mode commands for navigation in history. Btw, C-l for clearing screen disappear too, is there a default key binding for clearing the screen in Vi mode?
History navigation in Vi mode of Bash shell
bash;shell;keyboard shortcuts;command history;vi
The default key-bindings for moving up or down in the command history in all shells that I know of that supports Vi key-bindings is k for the previous command and j for the next command.These are the same as the corresponding movement commands in the Vi editor.For them to work, you will have to be in normal mode, i.e. you have to press Esc once.To clear the screen, use the command clear.