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
|
2010-04-17 17:00:06 -05:00
|
|
|
screen*|xterm*|putty*)
|
2009-01-02 18:37:27 -05:00
|
|
|
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
|
2009-12-07 12:43:10 -06:00
|
|
|
bindkey '\eO5C' emacs-forward-word
|
|
|
|
bindkey '\eO5D' emacs-backward-word
|
2016-11-03 21:30:53 -07:00
|
|
|
bindkey '\eOC' forward-char
|
|
|
|
bindkey '\eOD' backward-char
|
2009-01-02 18:37:27 -05:00
|
|
|
bindkey '\eOc' emacs-forward-word
|
|
|
|
bindkey '\eOd' emacs-backward-word
|
|
|
|
bindkey '\e[c' emacs-forward-word
|
|
|
|
bindkey '\e[d' emacs-backward-word
|
2009-12-07 12:43:10 -06:00
|
|
|
bindkey '\M-B\M-^H' backward-kill-word
|
2010-06-18 16:14:41 -05:00
|
|
|
bindkey '\M-^H' backward-kill-word
|
2010-04-24 12:34:14 -05:00
|
|
|
bindkey '\M-C\M-?' backward-kill-word
|
2009-01-02 18:37:27 -05:00
|
|
|
;;
|
|
|
|
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
|
2010-04-24 12:34:14 -05:00
|
|
|
bindkey '\e[1;5C' emacs-forward-word
|
|
|
|
bindkey '\e[1;5D' emacs-backward-word
|
|
|
|
bindkey '\e[3~' delete-char
|
2009-01-02 18:37:27 -05:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|