Setup special keybindings using terminfo

The support for special keys right now is simply with hardcoded values,
this commit changes that to using terminfo information for the keys to
set the binds.  Should be much more general, and just work, at least
most of the time.  This also fixes a bug in the vi-mode plugin where the
special keys were not bound because setting vi mode removes binds set in
emacs mode.
This commit is contained in:
Jim Hester 2013-02-26 10:40:26 -05:00
commit 3639d665b5
3 changed files with 41 additions and 37 deletions

View file

@ -20,6 +20,9 @@ zle -N zle-keymap-select
bindkey -v
#rebind special key keybinds
source $ZSH/lib/special-keys.zsh
# if mode indicator wasn't setup by theme, define default
if [[ "$MODE_INDICATOR" == "" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"