dots/zsh/bindkey
David Majnemer ba2f3cfb85 huge changes and refactoring done:
-   split zsh into many files
-   add bash support
-   cleaned up lots of stuff, created a commonsh folder for common stuff between bash and zsh
-   commonsh supports an order of execution, deliminated by filename. This is to enforce dependencies
All of these changes were needed so that we could sensibly continue to extend the system
2009-01-02 18:37:27 -05:00

69 lines
1.7 KiB
Text
Executable file

# 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
;;
cygwin*)
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
;;
esac