I recently switched to using vi mode (set :o vi) in my bash terminal. In the past, I’ve always used ctrl+p to look through previous commands, but for some reason after switching to vi mode bash hangs for about 20 seconds or so when I press ctrl+p in insert mode.
Note, this only happens over ssh. Locally it just inserts ^P.
Does anyone know why this is happening, or how I can hack it to remove the ctrl+p shortcut from OS X Terminal (I’m happy with using ESC, k, k,...)?
Thanks
In insert mode, ^P is bound to
menu-complete-backward, so it’s running through all of bash-completion, which takes a while. If you want to cycle through the command history, you need to leave insert mode and use k and j. You could also bind ^P toprevious-history.In the OS X version of bash (which uses BSD libedit instead of GNU readline), ^P in insert mode doesn’t do anything.