6 ms·
I use and love the same mechanism with a different binding though: bindkey '^P' up-line-or-search bindkey '^N' down-line-or-search Using Ctrl - P or Ctrl
by neric 12y ago
I use and love the same mechanism with a different binding though:
bindkey '^P' up-line-or-search
bindkey '^N' down-line-or-search
Using Ctrl - P or Ctrl - N on an empty command line will just cycle through all your past commands.
Now if the line begins by vim, then pressing Ctrl - P will cycle just through all your previous vim commands
Greatness!
- loevborg 12y agoI like your key bindings even better! However, I still prefer the "beginning-search" instead of just the "search" function: bindkey '^P' history-beginning-search-backward bindkey '^N' history-beginning-search-forward It works and I don't see a downside to this: ^P and ^N still work as expected. (Why not the cursor keys? Because then you need to take your fingers off the home row.)