[zsh] New keybinding configuration

This commit is contained in:
Thomas Kolb 2013-07-21 22:04:53 +02:00
parent 42b37ff4cd
commit 3eb87006aa

View file

@ -1,34 +1,28 @@
# Skip all this for non-interactive shells # Skip all this for non-interactive shells
#[[ -z "$PS1" ]] && return [[ -z "$PS1" ]] && return
# Use Emacs keybindings # Use Vim keybindings
bindkey -e bindkey -v
# Keybindings converted from readline # Custom keybindings (movement)
bindkey "\e[1~" beginning-of-line # normal terminal
bindkey "\e[4~" end-of-line bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
bindkey "\e[5~" history-search-backward bindkey "\e[5~" history-search-backward
bindkey "\e[6~" history-search-forward bindkey "\e[6~" history-search-forward
bindkey "\e[3~" delete-char bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e\e[C" forward-word
bindkey "\e\e[D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word
bindkey "\eOc" forward-word bindkey "\eOc" forward-word
bindkey "\eOd" backward-word bindkey "\eOd" backward-word
bindkey "\e[1;3C" forward-word
bindkey "\e[1;3D" backward-word # tmux
bindkey "\e[8~" end-of-line bindkey "\e[1~" beginning-of-line
bindkey "\eOH" beginning-of-line bindkey "\e[4~" end-of-line
bindkey "\eOF" end-of-line bindkey "\eOC" forward-word
bindkey "\e[H" beginning-of-line bindkey "\eOD" backward-word
bindkey "\e[F" end-of-line
bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
bindkey "^P" push-input bindkey "^P" push-input
bindkey "^R" history-incremental-search-backward
# Setup history # Setup history
HISTFILE=~/.histfile HISTFILE=~/.histfile