Skip to content

Commit

Permalink
GH-21: bind arrow key codes according to terminfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sorin-ionescu authored and sunaku committed Jul 5, 2013
1 parent 99341be commit d9b28ed
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ Usage
2. Bind keyboard shortcuts to this script's functions:

# bind UP and DOWN arrow keys
for keycode in '[' 'O'; do
bindkey "^[${keycode}A" history-substring-search-up
bindkey "^[${keycode}B" history-substring-search-down
done
unset keycode
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down

# bind P and N for EMACS mode
bindkey -M emacs '^P' history-substring-search-up
Expand Down

0 comments on commit d9b28ed

Please sign in to comment.