ambevar-dotfiles/.shell.d/keys_zsh

71 lines
1.7 KiB
Plaintext

################################################################################
## Zsh Key bindings
## 2012-08-11
################################################################################
## References:
## http://mundy.yazzy.org/unix/zsh.php
## http://www.zsh.org/mla/users/2000/msg00727.html
## Bindings functions:
# backward-char
# backward-delete-char
# backward-delete-to-slash
# backward-word
# beginning-of-history # PageUp
# beginning-of-line # Home
# delete-char # Del
# down-line-or-history
# down-line-or-search
# emacs-backward-word
# emacs-forward-word
# end-of-history # PageDown
# end-of-line # End
# forward-char
# forward-word
# quoted-insert # Ins
# up-line-or-history
# up-line-or-search
# expand-or-complete-prefix ## completion in the middle of a line
## Emacs bindings
bindkey -e
## Set '/' as a word delimiter.
autoload -U select-word-style
select-word-style bash
## ???
# typeset -g -A key
## Note that double brackets are needed to expand wildcards properly.
if [[ $TERM = *xterm* ]] ; then
bindkey "\e[3~" delete-char
bindkey "\e[1;5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
bindkey "\e[Z" reverse-menu-complete # Shift+Tab
fi
if [[ $TERM = *rxvt* ]] ; then
bindkey "\e[3~" delete-char
bindkey "\eOd" backward-word
bindkey "\eOc" forward-word
bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
bindkey "\e[Z" reverse-menu-complete # Shift+Tab
fi
## For rxvt.
# bindkey "\e[7~" beginning-of-line # Home
# bindkey "\e[8~" end-of-line # End
## For FreeBSD console.
# bindkey "\e[H" beginning-of-line
# bindkey "\e[F" end-of-line