64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
################################################################################
|
|
## Zsh Key bindings
|
|
## Date 2011-11-19
|
|
################################################################################
|
|
|
|
|
|
##==============================================================================
|
|
## Zsh keys
|
|
##==============================================================================
|
|
# 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
|
|
|
|
if isShell "zsh"; then
|
|
bindkey -e # Emacs bindings
|
|
|
|
|
|
## Set '/' as a word delimiter.
|
|
autoload -U select-word-style
|
|
select-word-style bash
|
|
|
|
## ???
|
|
# typeset -g -A key
|
|
|
|
## For non RH/Debian xterm, can't hurt for RH/Debian xterm.
|
|
if [ "xterm" = "$TERM" ]; 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
|
|
|
|
## 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
|
|
|
|
fi |