2013-03-15 07:37:33 +00:00
|
|
|
#!/bin/zsh
|
|
|
|
|
|
|
|
exit(){builtin exit;}
|
|
|
|
zle -N q exit
|
|
|
|
|
|
|
|
bindkey -M vicmd ! edit-command-line-tmux
|
|
|
|
|
|
|
|
#unicode input
|
|
|
|
autoload -U insert-unicode-char
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey $'\26u' insert-unicode-char
|
|
|
|
bindkey "\e." insert-last-word
|
2013-03-15 07:37:33 +00:00
|
|
|
|
|
|
|
bindkey "^[[2~" yank # Insert
|
|
|
|
bindkey "^[[3~" delete-char # Del
|
|
|
|
bindkey "^[[5~" history-beginning-search-backward # PageUp
|
|
|
|
bindkey "^[[6~" history-beginning-search-forward # PageDown
|
|
|
|
bindkey "^[e" expand-cmd-path # C-e for expanding path of typed command.
|
|
|
|
bindkey "^[[A" up-line-or-search # Up arrow for back-history-search.
|
|
|
|
bindkey "^[[B" down-line-or-search # Down arrow for fwd-history-search.
|
|
|
|
bindkey " " magic-space # Do history expansion on space.
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey $'\177' backward-delete-char #backspace
|
|
|
|
bindkey $'\10' backward-delete-word #C-backspace
|
2013-03-15 07:37:33 +00:00
|
|
|
case "$TERM" in
|
|
|
|
*xterm*|(dt|k)term)
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey "\e[H" beginning-of-line # Pos1
|
|
|
|
bindkey "\e[F" end-of-line # End
|
2013-03-15 07:37:33 +00:00
|
|
|
;;
|
|
|
|
rxvt*|Eterm)
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey "\e[7~" beginning-of-line # Pos1
|
|
|
|
bindkey "\e[8~" end-of-line # End
|
2013-03-15 07:37:33 +00:00
|
|
|
;;
|
|
|
|
linux|screen*)
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey "\e[1~" beginning-of-line # Pos1
|
|
|
|
bindkey "\e[4~" end-of-line # End
|
2013-03-15 07:37:33 +00:00
|
|
|
;;
|
|
|
|
esac
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey "\eOA" up-line-or-history
|
|
|
|
bindkey "\eOB" down-line-or-history
|
|
|
|
bindkey "\e[1;5D" vi-backward-blank-word
|
|
|
|
bindkey "\e[1;5C" vi-forward-blank-word
|
2013-03-15 07:37:33 +00:00
|
|
|
#bindkey . rationalise-dot
|
|
|
|
|
2014-06-27 05:43:45 +00:00
|
|
|
bindkey $'\20' push-line-or-edit
|