2009-01-02 18:37:27 -05:00
|
|
|
# keybindings
|
|
|
|
bindkey -d
|
|
|
|
bindkey -e
|
|
|
|
|
|
|
|
bindkey ' ' magic-space
|
|
|
|
|
|
|
|
bindkey -M emacs '\ee' edit-command-line
|
|
|
|
|
|
|
|
case $TERM in
|
|
|
|
screen|xterm*|putty)
|
|
|
|
bindkey '\e[H' beginning-of-line
|
|
|
|
bindkey '\e[F' end-of-line
|
|
|
|
bindkey '\eOH' beginning-of-line
|
|
|
|
bindkey '\eOF' end-of-line
|
|
|
|
bindkey '\e[1~' beginning-of-line
|
|
|
|
bindkey '\e[4~' end-of-line
|
|
|
|
bindkey '\e[7~' beginning-of-line
|
|
|
|
bindkey '\e[8~' end-of-line
|
|
|
|
bindkey '\e[3~' delete-char
|
|
|
|
bindkey '\e[1;5C' emacs-forward-word
|
|
|
|
bindkey '\e[1;5D' emacs-backward-word
|
|
|
|
bindkey '\e[5C' emacs-forward-word
|
|
|
|
bindkey '\e[5D' emacs-backward-word
|
|
|
|
bindkey '\eOC' emacs-forward-word
|
|
|
|
bindkey '\eOD' emacs-backward-word
|
|
|
|
bindkey '\eOc' emacs-forward-word
|
|
|
|
bindkey '\eOd' emacs-backward-word
|
|
|
|
bindkey '\e[c' emacs-forward-word
|
|
|
|
bindkey '\e[d' emacs-backward-word
|
|
|
|
;;
|
|
|
|
mlterm|kterm)
|
|
|
|
bindkey '\e[H' beginning-of-line
|
|
|
|
bindkey '\e[F' end-of-line
|
|
|
|
bindkey '\e[1~' beginning-of-line
|
|
|
|
bindkey '\e[4~' end-of-line
|
|
|
|
bindkey '\e[1;5C' emacs-forward-word
|
|
|
|
bindkey '\e[1;5D' emacs-backward-word
|
|
|
|
bindkey '\e[3~' delete-char
|
|
|
|
;;
|
|
|
|
linux|vt100)
|
|
|
|
bindkey '\e[1~' beginning-of-line
|
|
|
|
bindkey '\e[4~' end-of-line
|
|
|
|
bindkey '\e[3~' delete-char
|
|
|
|
;;
|
|
|
|
*rxvt*|Eterm|aterm)
|
|
|
|
bindkey '\e[c' emacs-forward-word
|
|
|
|
bindkey '\e[d' emacs-backward-word
|
|
|
|
bindkey '\eOc' emacs-forward-word
|
|
|
|
bindkey '\eOd' emacs-backward-word
|
|
|
|
bindkey '\e[3~' delete-char
|
|
|
|
bindkey '\e[7~' beginning-of-line
|
|
|
|
bindkey '\e[8~' end-of-line
|
|
|
|
;;
|
|
|
|
cons*)
|
|
|
|
bindkey '\e[H' beginning-of-line
|
|
|
|
bindkey '\e[F' end-of-line
|
|
|
|
bindkey '^?' delete-char
|
|
|
|
;;
|
|
|
|
interix)
|
|
|
|
bindkey '\e[H' beginning-of-line
|
|
|
|
bindkey '\e[U' end-of-line
|
|
|
|
bindkey '^?' delete-char
|
|
|
|
;;
|
2009-01-12 01:23:01 -05:00
|
|
|
sun*)
|
|
|
|
bindkey '\e[214z' beginning-of-line
|
|
|
|
bindkey '\e[220z' end-of-line
|
|
|
|
bindkey '^?' delete-char
|
|
|
|
;;
|
2009-01-02 18:37:27 -05:00
|
|
|
cygwin*)
|
|
|
|
bindkey '\e[1~' beginning-of-line
|
|
|
|
bindkey '\e[4~' end-of-line
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|