diff --git a/zsh/zshrc.local b/zsh/zshrc.local index b53101c..671a7ab 100644 --- a/zsh/zshrc.local +++ b/zsh/zshrc.local @@ -1,34 +1,28 @@ # Skip all this for non-interactive shells -#[[ -z "$PS1" ]] && return +[[ -z "$PS1" ]] && return -# Use Emacs keybindings -bindkey -e +# Use Vim keybindings +bindkey -v -# Keybindings converted from readline -bindkey "\e[1~" beginning-of-line -bindkey "\e[4~" end-of-line +# Custom keybindings (movement) +# normal terminal +bindkey "\e[7~" beginning-of-line +bindkey "\e[8~" end-of-line bindkey "\e[5~" history-search-backward bindkey "\e[6~" history-search-forward bindkey "\e[3~" delete-char 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 "\eOd" backward-word -bindkey "\e[1;3C" forward-word -bindkey "\e[1;3D" backward-word -bindkey "\e[8~" end-of-line -bindkey "\eOH" beginning-of-line -bindkey "\eOF" end-of-line -bindkey "\e[H" beginning-of-line -bindkey "\e[F" end-of-line -bindkey "\e[7~" beginning-of-line -bindkey "\e[8~" end-of-line + +# tmux +bindkey "\e[1~" beginning-of-line +bindkey "\e[4~" end-of-line +bindkey "\eOC" forward-word +bindkey "\eOD" backward-word + bindkey "^P" push-input +bindkey "^R" history-incremental-search-backward # Setup history HISTFILE=~/.histfile