|
@ -1,8 +1,6 @@ |
|
|
# bindkey -v # vim bindings |
|
|
# bindkey -v # vim bindings |
|
|
|
|
|
|
|
|
# History Mapping |
|
|
# History Mapping |
|
|
bindkey '^[[A' up-line-or-search |
|
|
|
|
|
bindkey '^[[B' down-line-or-search |
|
|
|
|
|
bindkey '^R' history-incremental-search-backward |
|
|
bindkey '^R' history-incremental-search-backward |
|
|
|
|
|
|
|
|
# Use Shift+Tab for reverse completion |
|
|
# Use Shift+Tab for reverse completion |
|
@ -11,11 +9,17 @@ bindkey '^[[Z' reverse-menu-complete |
|
|
# Use Alt+. for last argument |
|
|
# Use Alt+. for last argument |
|
|
bindkey '\e.' insert-last-word |
|
|
bindkey '\e.' insert-last-word |
|
|
|
|
|
|
|
|
|
|
|
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search |
|
|
|
|
|
zle -N up-line-or-beginning-search |
|
|
|
|
|
zle -N down-line-or-beginning-search |
|
|
|
|
|
|
|
|
case "${TERM}" in |
|
|
case "${TERM}" in |
|
|
(cons25*|linux) |
|
|
(cons25*|linux) |
|
|
bindkey '^[[1~' beginning-of-line # HOME |
|
|
bindkey '^[[1~' beginning-of-line # HOME |
|
|
bindkey '^[[4~' end-of-line # END |
|
|
bindkey '^[[4~' end-of-line # END |
|
|
bindkey '\e[5~' delete-char # DELETE |
|
|
bindkey '\e[5~' delete-char # DELETE |
|
|
|
|
|
bindkey '\e[A' up-line-or-beginning-search # UP |
|
|
|
|
|
bindkey '\e[B' down-line-or-beginning-search # DOWN |
|
|
;; |
|
|
;; |
|
|
(*xterm*) |
|
|
(*xterm*) |
|
|
bindkey '\e[H' beginning-of-line # HOME |
|
|
bindkey '\e[H' beginning-of-line # HOME |
|
@ -25,14 +29,18 @@ case "${TERM}" in |
|
|
bindkey '\e[3~' delete-char # DELETE |
|
|
bindkey '\e[3~' delete-char # DELETE |
|
|
bindkey '\e[1;5C' forward-word # CTRL+RIGHT |
|
|
bindkey '\e[1;5C' forward-word # CTRL+RIGHT |
|
|
bindkey '\e[1;5D' backward-word # CTRL+LEFT |
|
|
bindkey '\e[1;5D' backward-word # CTRL+LEFT |
|
|
|
|
|
bindkey '^[[A' history-beginning-search-backward # UP |
|
|
|
|
|
bindkey '^[[B' history-beginning-search-forward # DOWN |
|
|
;; |
|
|
;; |
|
|
(screen*) |
|
|
(screen*) |
|
|
bindkey '^[[1~' beginning-of-line # HOME |
|
|
|
|
|
bindkey '^[[4~' end-of-line # END |
|
|
|
|
|
bindkey '\e[3~' delete-char # DELETE |
|
|
|
|
|
bindkey '\eOc' forward-word # CTRL+RIGHT |
|
|
|
|
|
bindkey '\eOd' backward-word # CTRL+LEFT |
|
|
|
|
|
bindkey '^[[1;5C' forward-word # CTRL+RIGHT |
|
|
|
|
|
bindkey '^[[1;5D' backward-word # CTRL+LEFT |
|
|
|
|
|
|
|
|
bindkey '^[[1~' beginning-of-line # HOME |
|
|
|
|
|
bindkey '^[[4~' end-of-line # END |
|
|
|
|
|
bindkey '\e[3~' delete-char # DELETE |
|
|
|
|
|
bindkey '\eOc' forward-word # CTRL+RIGHT |
|
|
|
|
|
bindkey '\eOd' backward-word # CTRL+LEFT |
|
|
|
|
|
bindkey '^[[1;5C' forward-word # CTRL+RIGHT |
|
|
|
|
|
bindkey '^[[1;5D' backward-word # CTRL+LEFT |
|
|
|
|
|
bindkey '\e[A' up-line-or-beginning-search # UP |
|
|
|
|
|
bindkey '\e[B' down-line-or-beginning-search # DOWN |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |